• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Bat File Help!

HannibalX

Diamond Member
Hey guys, I am looking for some help writing a bat file. I am sure this is a very simple question for some of you programming veterans.

I have two directories. Directory A contains files that need to be copied to directory B.

Every so often directory A will get new files that need to be copied to directory B.

Basically I want to be able to copy just what is missing from directory B.

This way I can set the bat file to be a scheduled task and once a week directory B will be synced with what is in directory A. I need to be able to do this without copying the entire contents of directory A each time I have new files (about 8GB of data going of WAN so copying everything isn?t an option).

Can this be done?

Thanks for your help!
 
Would xcopy with /D work for you?

/D:m-d-y
Copies files changed on or after the specified date.
If no date is given, copies only those files whose source time is newer than the destination time.

There must be some cheap applications that would do this more elegantly than a batch file.
 
xcopy /MIR would be a good solution I believe. (/MIR mirrors the contents)

Example
xcopy c:\temp d:\temp /MIR /R:1 /W:1
 
Originally posted by: CalvinHobbes
Would xcopy with /D work for you?

/D:m-d-y
Copies files changed on or after the specified date.
If no date is given, copies only those files whose source time is newer than the destination time.

There must be some cheap applications that would do this more elegantly than a batch file.
That is what I was going to suggest, but with 8 gigs it could take a while. I also agree, there must be a more elegant way of doing this rather than resorting to a batch file.

 
Back
Top