Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MoveFolder method fails if someone is accesing the folder

Status
Not open for further replies.

z07924

IS-IT--Management
Feb 18, 2002
122
0
0
GB
Hello All!

DIM fso
Set FSO = CreateObject("Scripting.FileSystemObject")
Sourcedir = "\\nt0\user\test"
destdir = "\\nt0\user\test1"

If Not FSO.FolderExists(destdir) Then
FSO.MoveFolder sourcedir, destdir
End If

I am getting Permission denied error if someone is accessing sourcedir ("\\nt0\user\test"). Otherwise it is working great. Any tricks/tips to force it even someone is accessing.

thanks in advance.
 
I wouldn't try to force the move. If someone else is accessing the folder then you will cause them to crash by moving the folder. Just handle the error that you get.

Andy.
 


Think about what you are asking for here...... [/b][/i][/u]*******************************************************[sub]
General remarks:
If this post contains any suggestions for the use or distribution of code, components or files of any sort, it is still your responsibility to assure that you have the proper license and distribution rights to do so!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top