Checking the Archive Attribute with Robocopy

Written by Barry Dysert (last updated October 16, 2017)

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 35 years, working in different positions such as technical team leader, project manager, and software developer. He is currently a software engineer with an emphasis on developing custom applications under Microsoft Windows. When not working with Windows or writing Tips, Barry is an amateur writer. His first non-fiction book is titled "A Chronological Commentary of Revelation." ...

MORE FROM BARRY

Arranging Desktop Windows

Being able to effectively manage multiple windows is an important skill. This includes tiling and cascading them so you ...

Discover More

Using Your Own Pictures as Wallpaper

You can change the image that is displayed for your desktop background to your own picture. Changing the wallpaper to one ...

Discover More

Deleting a Saved Search

Windows Explorer has a good search utility built into it. As you use it, you may wish to delete a previously saved search ...

Discover More
More WindowsTips

Changing User Permissions for a File

All objects on your computer (e.g., files) have permissions that allow or deny various types of access. This tip shows ...

Discover More

Understanding ZIP Folders

Need to move a lot of information to someone else? The answer may be to store that information in a ZIP folder. Here's ...

Discover More

Showing File Extensions

All file types have an extension, and Microsoft hides them by default. Learn how to turn file extensions on.

Discover More
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}] (all 7 characters, in the sequence shown) 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 5 - 0?

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


Newest Tips