< Day Day Up > |
Using ATTRIBThe ATTRIB utility is important to understand because the correct setting of file and folder attributes is vital to the correct operation of Windows. ATTRIB is used to view and set basic file attributes (archive, read-only, system, and hidden). Folders can also have these attributes; for example, the folder C:\Windows\Fonts has the system attribute. A file or folder can have multiple attributes; for example, the Msdos.sys file used by Windows 9x/Me has system, hidden, and read-only attributes. If you need to edit Msdos.sys , you must use ATTRIB to remove these attributes before changing the file, and reapply these attributes after changing the file.
Options for ATTRIB in Windows 9x/Me include C:\>attrib /? Displays or changes file attributes. ATTRIB [+R -R] [+A -A] [+S -S] [+H -H] [[drive:][path]filename] [/S] + Sets an attribute. - Clears an attribute. R Read-only file attribute. A Archive file attribute. S System file attribute. H Hidden file attribute. /S Processes files in all directories in the specified path. Windows 2000/XP add the following option: /D Processes folders as well. When the ATTRIB command is run from the Windows 2000/XP Recovery Console, the /S and /D options are not available, but +C can be used to compress a file and -C can be used to uncompress a file. Here are some examples:
|
< Day Day Up > |