answersLogoWhite

0


Best Answer

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]

Examples

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

User Avatar

Wiki User

12y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is the meaning of attrib command in ms-dos?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What is msdos filter command?

what is ms dos filter command? explain with example


Find out the Attributes of file?

Just run attrib command..


What MS-DOS command can display hidden files?

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


Why Windows preferred MSDOS?

Many commands are still easy to run from command prompt..


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.


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.


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.


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

file attrib


How do you use the ATTRIB command?

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


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