≡ Menu

Clear archive attribute from command line.

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

Related posts:

Attrib command

4 comments… add one
  • Tim Hamilton

    How do I clear the archive bit for all files and folders within a folder and be able to watch the progress?

    • admin

      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

    • admin

      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.

  • JNettik

    attrib -a *.* /s

Leave a Comment