Checking the Archive Attribute with Robocopy

by Barry Dysert
(last updated August 18, 2014)

Robocopy can check and set file attributes as part of its copying procedure. (Understanding and Using File Attributes is covered under another tip.) If you want Robocopy to only copy those files that have the Archive attribute set it's a simple matter of specifying the /A switch. So let's say you want to copy the files from C:\Temp1 to C:\Temp3, but you only want to copy those files whose Archive attribute is set. The command to use would be:

C:\> ROBOCOPY C:\Temp1 C:\Temp3 /A

If you want the Archive attribute to be reset after the file is copied, use the /M switch. This will copy only the files with the Archive attribute set and then reset the attribute after the copy is performed:

C:\> ROBOCOPY C:\Temp1 C:\Temp3 /M

 This tip (13199) applies to Windows 7 and 8.

Author Bio

Barry Dysert

Barry has been a computer professional for over 30 years, working in different positions such as technical team leader, project manager, and software developer.  He is currently a senior software engineer with an emphasis on developing custom applications under Microsoft Windows. ...

MORE FROM BARRY

How to Find Apps Faster

This tip reveals a little-known trick that enables you to move around your Start menu a little faster. The result is getting ...

Discover More

Performing Complex Calculations Using the Scientific Calculator

The next time you need to perform calculations at your computer, there's no need to fire up a big spreadsheet program or even ...

Discover More

M8 Free Clipboard

If you've ever found it tedious to do copy/paste with one piece of information at a time, you'll really like M8 Free ...

Discover More
More WindowsTips

Creating a System Repair Disc

Doing a one-time create of a system repair disk can be worth its weight in gold if you find yourself unable to boot your ...

Discover More

Restoring from a Backup

Being able to restore from a backup is just as important as making the backup in the first place. This tip tells you how to ...

Discover More

Renaming Multiple Files at the Same Time

It's possible to rename multiple files at the same time, but the new names of the files may leave a bit to be desired. ...

Discover More
Subscribe

FREE SERVICE: Get tips like this every week in WindowsTips, a free productivity newsletter. Enter your address and click "Subscribe."

View most recent newsletter.

Comments

If you would like to add an image to your comment (not an avatar, but an image to help in making the point of your comment), include the characters [{fig}] in your comment text. You’ll be prompted to upload your image when you submit the comment. Maximum image size is 6Mpixels. Images larger than 600px wide or 1000px tall will be reduced. Up to three images may be included in a comment. All images are subject to review. Commenting privileges may be curtailed if inappropriate images are posted.

What is 7 - 0?

There are currently no comments for this tip. (Be the first to leave your comment—just use the simple form above!)


Newest Tips
Subscribe

FREE SERVICE: Get tips like this every week in WindowsTips, a free productivity newsletter. Enter your address and click "Subscribe."

(Your e-mail address is not shared with anyone, ever.)

View the most recent newsletter.