Results 1 to 9 of 9
  1. #1
    Bronze Lounger
    Join Date
    Feb 2008
    Posts
    1,420
    Thanks
    124
    Thanked 5 Times in 5 Posts

    Copying a file from One Folder to another

    I would like to copy data from one folder to another. If the file in the destination folder already exists, then when copying , a copy of the file must be created in the destination file

    The original code, was kindly supplied by Zeddy, which I have tried to adapt, but need some help

    It would be appreciated if someone could kindly assist me
    Attached Files Attached Files

  2. #2
    WS Lounge VIP
    Join Date
    Mar 2002
    Location
    Newcazzle, UK
    Posts
    2,826
    Thanks
    136
    Thanked 482 Times in 459 Posts
    Hi Howard

    ..I'm having a look at this, and will post back.

    zeddy

  3. #3
    Bronze Lounger
    Join Date
    Feb 2008
    Posts
    1,420
    Thanks
    124
    Thanked 5 Times in 5 Posts
    Hi Zeddy

    Thanks very much


    Howard

  4. #4
    Silver Lounger
    Join Date
    Oct 2012
    Posts
    2,335
    Thanks
    13
    Thanked 267 Times in 260 Posts
    I use TeraCopy for that, it says duplicate file name with some options, I click on rename all and the matching file names are appended and copied over.

  5. #5
    Bronze Lounger
    Join Date
    Feb 2008
    Posts
    1,420
    Thanks
    124
    Thanked 5 Times in 5 Posts
    Thanks for the info. I still however, prefer to use a macro

  6. #6
    WS Lounge VIP
    Join Date
    Mar 2002
    Location
    Newcazzle, UK
    Posts
    2,826
    Thanks
    136
    Thanked 482 Times in 459 Posts
    Hi Howard

    ..I'm testing my updated file.
    ..will post it when finished (maybe tomorrow).

    zeddy

  7. #7
    Bronze Lounger
    Join Date
    Feb 2008
    Posts
    1,420
    Thanks
    124
    Thanked 5 Times in 5 Posts
    Thanks Zeddy for the feedback

  8. #8
    WS Lounge VIP
    Join Date
    Mar 2002
    Location
    Newcazzle, UK
    Posts
    2,826
    Thanks
    136
    Thanked 482 Times in 459 Posts
    Hi Howard

    I would like to copy data from one folder to another. If the file in the destination folder already exists, then when copying , a copy of the file must be created in the destination file
    When copying files from one folder to another, the attached file will allow you to choose whether to overwrite existing files in the destination folder.
    If you decide to keep existing files, then the file xxxxxxxx.zzzz being copied will be renamed as
    xxxxxxxx(1).zzzz in the destination folder.

    If xxxxxxxx(1).zzzz already exists in the destination folder, then the file xxxxxxxx.zzzz being copied will be renamed as
    xxxxxxxx(2).zzzz in the destination folder.
    ..and so on etc etc etc.

    I have commented the vba code to help you figure out how this is done.
    I have saved the attached file in .xls format, for compatibility with anyone stuck with Excel2003.

    Any questions, (like if you wanted to MOVE the files rather than COPY the files), please ask..

    zeddy
    Attached Files Attached Files

  9. The Following User Says Thank You to zeddy For This Useful Post:

    HowardC (2015-10-29)

  10. #9
    Bronze Lounger
    Join Date
    Feb 2008
    Posts
    1,420
    Thanks
    124
    Thanked 5 Times in 5 Posts
    Hi Zeddy

    You are a star-thanks very much. Code works perfectly. I will be going through the code over the weekend to get to grips with what you have done


    Howard

Posting Permissions

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