Problem with permission when copy files
Hello everyone
I'm facing an issue
I'm using this code to copy all the files
Code:
Try
My.Computer.FileSystem.CopyDirectory(VBFrom_Path, VBTo_Path, True)
Catch ex As Exception
MsgBox("Unable to make the copy")
End Try
The problem is when in the VBTo_Path put a folder on a server without having permission in this folder. (Absolutely logical)
Is there any way to give permission thru the program?? I don't want users had permission in a server folder!!!
Thanks and regards
Re: Problem with permission when copy files
Usually, although not always, a user wouldn't be granting themselves permission to write to a folder. That would rather defeat the purpose of folder permissions. Is this a special case for some reason?
Re: Problem with permission when copy files
Ela.
You can use impersonation to give elevated permissions.
Take a look at this post that had somewhat the same issue. The guy decided to use an xcopy implementation. I don't know how did that ended up.
http://www.vbforums.com/showthread.p...(User-folders)