![emcopy exclude multiple directories emcopy exclude multiple directories](https://demo.vdocuments.mx/img/378x509/reader022/reader/2020060112/5e7ab6126c84a36d3b6f9d87/r-2.jpg)
If others find this and like it (or not!) please say so. And, again, you only run attrib /s +a when you are going to do a full, not a partial, backup. Scaling up linearly, 2TB would take about 20 minutes, but you'd need four days to copy it all. The same data takes about five hours to copy to USB 2.0 drive. When I run attrib /s +a on 100Gb, made up of about 250,000 files, it only takes a minute.
![emcopy exclude multiple directories emcopy exclude multiple directories](https://www.sharetotest.com/images/DEE-1421.files/image010.jpg)
Running attrib on 2TB sounds daunting, but it's going to be a fraction of the time needed to copy it and, using my approach you only run attrib when you are about to copy all of your data.
EMCOPY EXCLUDE MULTIPLE DIRECTORIES ARCHIVE
That would leave a changed file with its archive flag clear, not set, as of the next time you run your copy program. Using attrib /s -a after you make the copy runs the risk that in the short time between making the copy and running attrib, a file may change. After that, files you change or create will have the flag set and you can use the exact same copy command and options to copy only the changed or new files. Then have your copy program (robocopy works fine, but so does xcopy, for me) copy "only" files with the flag set (which will be all of them), clearing the flag as it copies each file (that's via the /M option for both robocopy and xcopy). But, instead of clearing the archive flag, set it. I recommend using attrib before running your copy, not after. a-:a affects the new copies, not the originals.
![emcopy exclude multiple directories emcopy exclude multiple directories](https://files.realpython.com/media/vscode-website.491c40d9d828.png)
I know this reply is to an old discussion, but I found it on Google as it relates to precisely what I am doing, so I am adding this for others who might find there way here for the same reason.