Results 1 to 2 of 2

Thread: Copy function in VB6

  1. #1

    Thread Starter
    New Member
    Join Date
    Jan 2001
    Posts
    13
    I need to find out how to copy a folder to a destination but have the copy process compare the source and destination only copying files that have been modified. I know you can do this in dos with XCOPY. Is their a way I can call an XCOPY dos command to do this if so HOW? I would prefer a VB way but I just don't know how to start.

  2. #2
    Evil Genius alex_read's Avatar
    Join Date
    May 2000
    Location
    Espoo, Finland
    Posts
    5,538
    What about the filesystem object ?

    One of the methods of this is GetFileVersion.
    You could use an if...then statement to check if the version you are copying is older, and if so to then copy the file.

    Put all this in a do...while filename <> "" loop to check through all of the files in the folder for the versions, then to copy as neccessary.

    This is probalbly not the best suggestion, but I hope it helps if no-one else posts here.

    Please rate this post if it was useful for you!
    Please try to search before creating a new post,
    Please format code using [ code ][ /code ], and
    Post sample code, error details & problem details

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