answersLogoWhite

0

How do you use the ATTRIB command?

Updated: 12/22/2022
User Avatar

Wiki User

14y ago

Best Answer

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

User Avatar

Wiki User

14y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How do you use the ATTRIB command?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

How do you change attribute for a file?

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.


Find out the Attributes of file?

Just run attrib command..


What command in windows 98 can you use to change a files settings?

The ATTRIB command displays or changes the read-only, archive, system, and hidden attributes assigned to files


What is the command to make the file Myfile.txt a hidden file?

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


What MS-DOS command can display hidden files?

The attrib command is capable of displaying files that have been marked as hidden.


What is attrib plus r -h?

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.


Which switches can be used with Attrib command?

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.


Which MS-DOS command can display hidden files?

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..


Which MS DOS command can display hidden files?

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..


What Command displays or changes the read only archive system and hidden characteristics of files?

file attrib


What is the working of attrib command?

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.


What is the meaning of attrib command in ms-dos?

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.