I have been playing with robocopy for some time now. I have setup a simple program to mirror my flash drive to whatever computer I plug it into.
The problem is best explained by this example:
1. I run the program daily on a certain computer.
2. I also run this program every once in a while on different computers so these other computers don't have everything new all the time. When I run it on these other computers they backup the entire drive and not just what is new.
3. when I run this program again on the daily computer after running it some where else it again backs up everything regardless of whats on the computer that is the same as on the flash
so to sum it up when ever I change computers and backup it backs up everything, instead of just what is new from the last time I backed it up on that computer, and then when I go back to my PC i use regularly it backs up everything all over agian even though nothing has changed.
I beleive it has to be something with the arichive bit being reset...but I thought robocopy was looking at dates last modified / created not just an archive bit.
any help would be great!
here is the robocopy switches/parameters I am using and a sample of part of the program:
set source=%drivePath%
set dest=C:\%user%
set what= /COPYALL /B /MIR
:: /COPYALL COPY ALL file info
:: /B copy files in Backup mode.
:: /SEC copy files with SECurity
:: /MIR MIRror a directory tree
set options=/R:0 /W:0 /LOG:%drivePath%\logs\Robo-log.txt /NDL /NP /TEE /XO
:: /R:n number of Retries
:: /W:n Wait time between retries
:: /LOG Output log file
:: /NDL No dir logging so it doesn't show all directories (shows everything on the flash)
:: /NP No Progress – don’t display % copied.
:: /TEE display on screen while logging
:: /XO If destination has the same file as source with the same date or newer then nothing is copied from source to destination
echo ### Mirroring...
::robocopy command pulling variables from above
ROBOCOPY %source% %dest% %what% %options%
Bookmarks