1

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?

4

1 Answer 1

1

You would use the /XA:[RASHCNETO] or /XF switches to exclude files with specifics attributes.

One could also use the min/max exclusion switches.

  • For example:
    • Size:
      • /MAX:n - MAXimum file size - exclude files bigger than n bytes
      • /MIN:n - MINimum file size - exclude files smaller than n bytes
    • Age:
      • /MAXAGE:n - MAXimum file AGE - exclude files older than n days/date
      • /MINAGE:n - MINimum file AGE - exclude files newer than n days/date
    • Access:
      • /MAXLAD:n - MAXimum Last Access Date - exclude files unused since n
      • /MINLAD:n - MINimum Last Access Date - exclude files used since n

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.