example: have already synched F:\Pictures\2017 and need to find all other files in F:\Pictures that have been modified since the last backup on May 1, 2017
In windows Explorer, navigate to the F:\Pictures folder and in the search box in the upper right paste the string below to find all files excluding folders [size > 0] with date after last backup not in 2017 folder or it's children
size:>0 AND datemodified:>5/1/2017 AND NOT folder:"*\2017\*" AND NOT folder:"*\2017*"
more information here
In the results pane Ctrl+A to select all, then Shift+Right click and select Copy as path. Open EditPad and paste into a new document. Each line will contain one filename surrounded by double quotes, such as
"F:\Pictures\2010s\2011\sample\example image.JPG"
Note: This step may need to be modified to account for overwriting old files
Search for
"(.):(.*)\\(.*)"
Replace with this string, assuming H is the USB drive / destination drive
ROBOCOPY "\1:\2" "H:\\COPYTEST\2" "\3" /LOG+:H:\\COPYTEST\LOG.TXT
Save the file as a .BAT file.
H:\COPYTEST\LOG.TXT - CREATE IT AND PUT SOME TEXT IN IT
^((?!Files :).)*
[BLANK]
^\r\n
[BLANK]
^\r
[BLANK]
^((?!Files : ).)* -- GETS RID OF FILENAMES
[BLANK]
^\r\n
[BLANK]
the idea is explained in detail here: copy search results preserve folders
last updated: Tue 2017-05-23 7:35 AM