Format:
ATTRIB (+ or - H R S A) DRIVE:\PATH\File.ext
+ Sets an attribute
- Removes an attribute
H = Hidden
R = Read-Only
S = System
A = Archive
MS-DOS contains the command "attrib" which accepts two parameters. For example for making a certain file hidden use the following sequence: attrib +h filename. To return to the original condition use the sequence: attrib -h filename.
Just run attrib command..
The ATTRIB command displays or changes the read-only, archive, system, and hidden attributes assigned to files
A simple way is to right click on the myfile.txt, select Properties and put a check in the 'Hidden' checkbox. Another way would be to: in the command window (Start > Run , type "cmd" in the box). CD to the myfile.txt folder and then use this: attrib +h myfile.txt or attrib +h "path to myfile.txt" (include the quotes) attrib -h would remove the hidden setting
The attrib command is capable of displaying files that have been marked as hidden.
The command "attrib +r -h" is used in the command prompt to set a file as read-only (+r) and remove the hidden attribute (-h) from a file. This command can help protect files from being accidentally modified and also make hidden files visible.
Attrib Command(http://www.epanel.co.cc/2010/04/attrib-command.html)Attrib allows a user to change the properties of a specified file. Using Attrib, the user has the capability of changing the file to have any of the below attributes. This command is available in DOS 3.0 and above and Windows 95 and above. We need to apply (+) or (-) option to apply or remove the effect.Read-only (R): Allowing the file to be only viewed and not written to.Archived (A): Allowing Microsoft backup and other backup programs to know what files to backup.Hidden (H): Making the file invisible to standard users.System (S): Making the file an important system file.Syntax: attrib [+/-] [r/a/h/s] [filename] ExamplesTo Set the Read Only permission to Autoexec.bat present in C Drive, we need to run the Command: "attrib +r c:\autoexec.bat"To Remove the Read Only permission from Autoexec.bat, we need to run the Command: "attrib -r c:\autoexec.bat"To Set the Hidden permission to Autoexec.bat, we need to run the command: "attrib +h c:\autoexec.bat"To Remove the Hidden permission from Autoexec.bat, we need to run the Command: "attrib -h c:\autoexec.bat"When you create any file or directory, Archive Attribute set by default. If you want to see the Attribute for each file, just run "attrib" Command and it will show you the present attribute. If you want to see the file with Read Only attribute, run "dir /ar" Command. Similarly for Hidden Attribute run "dir /ah" and for System Attribute run "dir /as". In ideal DOS, it is not possible to delete any file having Read Only or Hidden attributes, but if you are working with Windows Shell, you can delete the file having these attributes.
If you just want to display the hidden files, run following command: dir /ah this will show you all hidden files and folders.. However if you want to change the attributes permanently, use attrib command..
If you just want to display the hidden files, run following command: dir /ah this will show you all hidden files and folders.. However if you want to change the attributes permanently, use attrib command..
file attrib
The attrib command is a Recovery Console command used to change the file attributes for a file or directory while in Recovery Console. An attrib command is also available from the Command Prompt. attrib [+r|-r] [+s|-s] [+h|-h] [+c|-c] [filename] +r = This assigns the read-only file attribute to the file or directory. -r = This removes the read-only attribute. +s = This assigns the system file attribute to the file or directory. -s = This removes the system attribute. +h = This assigns the hidden file attribute to the file or directory. -h = This removes the hidden attribute. +c = This assigns the compressed file attribute to the file or directory. -c = This removes the compressed attribute. filename = This is the file or directory that you are wanting to change the attributes of.
Attrib allows a user to change the properties of a specified file. Using Attrib, the user has the capability of changing the file to have any of the below attributes. This command is available in DOS 3.0 and above and Windows 95 and above. We need to apply(+) or (-) option to apply or remove the effect.Read-only (R): Allowing the file to be only viewed and not written to.Archived (A): Allowing Microsoft backup and other backup programs to know what files to backup.Hidden (H): Making the file invisible to standard users.System (S): Making the file an important system file.Syntax: attrib [+/-] [r/a/h/s] [filename] ExamplesTo Set the Read Only permission to Autoexec.bat present in CDrive, we need to run the Command: "attrib +r c:\autoexec.bat"To Remove the Read Only permission from Autoexec.bat, we need to run the Command: "attrib -r c:\autoexec.bat"To Set the Hidden permission to Autoexec.bat, we need to run the command: "attrib +h c:\autoexec.bat"To Remove the Hidden permission from Autoexec.bat, we need to run the Command: "attrib -h c:\autoexec.bat"When you create any file or directory, Archive Attribute set by default. If you want to see the Attribute for each file, just run "attrib" Command and it will show you the present attribute. If you want to see the file with Read Only attribute, run "dir /ar" Command. Similarly for Hidden Attribute run "dir /ah" and for System Attribute run "dir /as". In ideal DOS, it is not possible to delete any file having Read Only or Hidden attributes, but if you are working with Windows Shell, you can delete the file having these attributes.