I'm trying to backup all of my programs I've written without any of the other stuff, and their location in the folder structure is important because it helps me know what the program is for. Luckily I found this exact questions here already (Windows 7 - Move only files of a given extension while preserving folder structure), and the answer (Robocopy) works nearly perfectly. But unfortunately when I search for "*.sas" it includes all "*.sasb7dat" files, and while the .sas files are the plain text files I want, the .sasb7dat are data files (that are occasionally massive) that I very much do NOT want. Is there a way to restrict the search to only .sas files?
You would use the
/XF switches to exclude files with specifics attributes.
One could also use the min/max exclusion switches.
- For example:
/MAX:n - MAXimum file size - exclude files bigger than n bytes
/MIN:n - MINimum file size - exclude files smaller than n bytes
/MAXAGE:n - MAXimum file AGE - exclude files older than n days/date
/MINAGE:n - MINimum file AGE - exclude files newer than n days/date
/MAXLAD:n - MAXimum Last Access Date - exclude files unused since n
/MINLAD:n - MINimum Last Access Date - exclude files used since n