Jump to content

Directory/File Copy, if newer


Recommended Posts

I have almost 10 gigs of data stored on a server shared drive that I want to periodically backup to another system (via script). The majority of the data doesn't change, so I don't want to tie up all the network bandwidth during this process to copy files that already exist on the destination system.

The share has many files which are stored in multiple subdirectories of the share. (No files exist in the root share).

Source = \\Server1\share1

Destination = E:\Backup (Local workstation drive)

When I use the DirCopy("\\Server1\share1", "E:\Backup",1) it overwrites the existing files on drive E:, which takes a HUGE amount of time.

When I use the DirCopy("\\Server1\share1", "E:\Backup",0) it doesn't attempt to copy any of the subdirectories or the files contained therein.

I need a way to script the following:

Copy new (or newer) files/directories/subdirectories From the server share To a local disk folder.

Roger O."When people show you who they are, believe them.” --Mark Twain

Link to comment
Share on other sites

In any case you need check every file for changes. You can use Larry's file search UDF that return array with found files, then check every file for changes (usually date/time checking enough) and copy only changed/added. Of course, you can modify this UDF and copy files at once.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...