Results 1 to 3 of 3

Thread: Problem with permission when copy files

  1. #1

    Thread Starter
    Join Date
    Nov 2010

    Problem with permission when copy files

    Hello everyone

    I'm facing an issue
    I'm using this code to copy all the files
                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

  2. #2
    .NUT jmcilhinney's Avatar
    Join Date
    May 2005
    Sydney, Australia

    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?

  3. #3
    King of sapila
    Join Date
    Oct 2006

    Re: Problem with permission when copy files

    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.
    Last edited by sapator; Oct 10th, 2018 at 08:44 AM.
    Slow as hell.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Click Here to Expand Forum to Full Width