2

I know that if using robocopy to copy only files of type .sas7bdat I would use the following code,

ROBOCOPY C:\source C:\destination *.sas7bdat /E

How can I reverse this to copy all file types except .sas7bdat ?

1 Answer 1

2

You're looking for the /xf flag.

Change the command to ROBOCOPY C:\source C:\destination /xf *.sas7bdat /E to exclude all files that are matched by the pattern that follows /xf.

I did a quick test of this and adding the flag meant that all files that did not match *.sad7bdat were copied to the destination folder.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .