Quantcast
Channel: Microsoft Community - Using ROBOCOPY In A Batch Script To Backup Files & Folders On Windows Vista/7
Viewing all articles
Browse latest Browse all 78

Using ROBOCOPY In A Batch Script To Backup Files & Folders On Windows Vista/7

$
0
0

Thanks, I appreciate that.  Just FYI, I added one last line to the script.  I added the "attrib" command to execute after the complete backup process.  This ensures that the Archive bit gets reset on all of the files after the complete backup, so that the next incremental backup doesn't copy files that have already been backed up in the complete backup.  Without this command, the first incremental performed after a complete backup will contain some of the files that were copied in the complete backup, even though those files may not have changed.  The incremental process uses the /M switch, which sets the Archive bit of the source files to OFF after copying the files, but the /M switch also instructs robocopy to only copy files whos Archives bits are set to ON, so that switch cannot be used in the complete backup process.

 

The script still functions safely and reliably without the attrib command.  However, it doesn't operate as efficiently as it does with it.  E.g., not a big deal, just a deal.


Viewing all articles
Browse latest Browse all 78

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>