rogerd2u Posted March 10, 2005 Share Posted March 10, 2005 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 More sharing options...
Lazycat Posted March 10, 2005 Share Posted March 10, 2005 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. Koda homepage ([s]Outdated Koda homepage[/s]) (Bug Tracker)My Autoit script page ([s]Outdated mirror[/s]) Link to comment Share on other sites More sharing options...
lyledg Posted March 10, 2005 Share Posted March 10, 2005 You could always use Robocopy from the MS resource kit, that will do a comparrison of the both directory file structures, and only copy over the newer files (if there are any).. Very easy to implement... Link to comment Share on other sites More sharing options...
rogerd2u Posted March 10, 2005 Author Share Posted March 10, 2005 Thanks for the ROBOCOPY suggestion!! That was exactly what I needed. THANK YOU SO MUCH! Roger O."When people show you who they are, believe them. --Mark Twain Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now