Results 1 to 3 of 3

Thread: VB 2010: Copy Directory Without Overwriting

  1. #1

    Thread Starter
    Addicted Member HunterTTP's Avatar
    Join Date
    Jul 2012
    Posts
    146

    Question VB 2010: Copy Directory Without Overwriting

    Alright, so it is very easy to copy one directory to another with this-

    Code:
    My.Computer.FileSystem.CopyDirectory("C:\TestDirectory1", "C:\TestDirectory2", True)
    The only problem is, this overwrites the existing directory. I would like to "merge" the two directories. Now this seems simple because you can just
    change the "True" to "False" like so-

    Code:
    My.Computer.FileSystem.CopyDirectory("C:\TestDirectory1", "C:\TestDirectory2", False)
    This would normally work fine, but the two directories I am merging, have some of the same named files.

    So how do I make it "merge" the folders, but "overwrite" the duplicate files/folders (without asking the user)?

    Any links/examples are much appreciated!

    Hunter
    Last edited by HunterTTP; Aug 20th, 2012 at 07:29 AM.

  2. #2

    Thread Starter
    Addicted Member HunterTTP's Avatar
    Join Date
    Jul 2012
    Posts
    146

    Re: VB 2010: Copy Directory Without Overwriting

    Bump

  3. #3

    Thread Starter
    Addicted Member HunterTTP's Avatar
    Join Date
    Jul 2012
    Posts
    146

    Re: VB 2010: Copy Directory Without Overwriting

    Bump

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