We can unset archive attribute of a file using attrib command. Syntax is given below.
attrib -a filename
Example:
attrib -a example.doc
The above command will unset archive attribute for the file example.doc
Windows XP, Windows 7, Server 2008, Vista command line tips
We can unset archive attribute of a file using attrib command. Syntax is given below.
attrib -a filename
Example:
attrib -a example.doc
The above command will unset archive attribute for the file example.doc
Previous post: Reboot Windows computer from command line (CMD)
Next post: Set hidden attribute from command prompt
{ 3 comments… read them below or add one }
How do I clear the archive bit for all files and folders within a folder and be able to watch the progress?
Tim, there is no direct command for setting/unsetting attributes for a group of files. Attrib command works on one file at a time. You can use the following batch file command though.
for /F %i in (‘dir /s /b ‘) do attrib -A %i
This command will unset archive attributes for all the files in the current directory and in the subdirectories.
To do this for a directory the command would be:
for /F %i in (‘dir /s /b directory_path ‘) do attrib -A %i
attrib command does not show any progrss. However, you can create your own batch script that prints the status and invokes attrib command on one file at a time.