The solution to remove read-only or hidden file attribute via cmd in all windows OS!
If you want to change the file attribute via windows command prompt please use ATTRIB command!
Description of the attributes:
H=Hidden, S=System, R = Read-only, A=Archive
use "+" to set a file atribute and "-" to remove file attributes!
# Show the file attribute in folder C:\TEST!
C:\Test>ATTRIB *.* A HR C:\Test\5.txt A HR C:\Test\Hidden-File1.txt A HR C:\Test\System File1.txt C:\Test>
# Change the file attribute!
"+" Sets an attribute.
"-" Clears an attribute.
In the example here, delete read-only attribute for all files in the folder "test".
for single File ARTTIB 5.txt -R remove read only
or ARTTIB 5.txt -H remove hidden file attribute
C:\Test>ATTRIB *.* -R /S C:\Test># List / Show file attribute again!
C:\Test>ATTRIB *.* A H C:\Test\5.txt A H C:\Test\Hidden-File1.txt A H C:\Test\System File1.txt C:\Test>
The help file for ATTRIB command!
Microsoft Windows X [Version 5.1.2600] (C) Copyright 1985-2014 Microsoft Corp. C:\Documents and Settings\Administrator\Desktop>ATTRIB /? Displays or changes file attributes. ATTRIB [+R | -R] [+A | -A ] [+S | -S] [+H | -H] [drive:][path][filename] [/S [/D]] + Sets an attribute. - Clears an attribute. R Read-only file attribute. A Archive file attribute. S System file attribute. H Hidden file attribute. [drive:][path][filename] Specifies a file or files for attrib to process. /S Processes matching files in the current folder and all subfolders. /D Processes folders as well. C:\Documents and Settings\Administrator\Desktop>
FAQ 8: Updated on: February 20th 2014 13:04