user1021822
user1021822

Reputation: 59

Need to write a batch file job

I need to write a batch job file to keep two folder in sync.

Inputs : Source and Destination folder names. senario :

  1. If the destination folder/subfolder is not found – create and proceed

  2. If the files are already present in both the folders Compare and overwrite destination file if timestamp/size differs.

  3. If the file not present in source and present in destination, delete the destination file.

kindly help me to write the batch job.

Thanks Vikram

Upvotes: 0

Views: 346

Answers (1)

Will
Will

Reputation: 75615

A batch file written by a self-professed inexperienced user - even run periodically - is not a good replacement for a sync tool like rsync or dropbox or even the Briefcase built into Windows. Robocopy looks a good bet.

Upvotes: 3

Related Questions