Getting Ready for Work

Getting Ready for Work

The A+ folks are somewhat enamored with the ATTRIB DOS command. As a result, you may encounter one or two questions about how to change the file attributes of a Windows file. The following sections guide you through this process.

Changing file attributes

Another file-related action that you need to know for the exam is how to change file attributes. The following four file attributes can be set for a file (or folder) in Windows:

  • Archive: Indicates that a file that is marked to be backed up.

  • Hidden: Prevents a file from appearing in directory listings.

  • Read-only: Indicates that a file that can be read but cannot be changed or deleted.

  • System: Indicates that a file that is used only by the operating system and is not typically displayed in a directory listing.

The ATTRIB command is used to display and modify the file attributes of a file. To view or change the file attributes for one or more files from the command prompt or through Windows Explorer, follow the processes that are described in Labs 19-1 and 19-2.

Lab 19-1: Changing File Attributes from the Command Prompt
Start example
  1. To display the current attributes of a file, change to the directory of the file and enter the following command:


    The system displays something like this:


    The series of letters at the beginning of this line are the first letters of the current attributes: A stands for Archive, S is for System, H is for Hidden, and R is for Read-only.

  2. To remove an attribute from a file, use the minus sign (–).

    For example, this command example removes the System, Hidden, and Read-only attributes from the file:

  3. To add an attribute to a file, use the plus sign (+).

    For example, this command example adds the Hidden attribute to the file:

End example
Lab 19-2: Changing File Attributes in Windows Explorer
Start example
  1. In Windows Explorer, right-click the file and select Properties from the pop-up menu that appears.

    In the Attributes section of the Properties window, the attributes that are enabled have check marks next to them.

  2. To remove or add an attribute to a file, simply check or uncheck the attributes as you desire.

  3. To change the System attribute, you must use the command prompt (see Lab 19-1).

End example

 Python   SQL   Java   php   Perl 
 game development   web development   internet   *nix   graphics   hardware 
 telecommunications   C++ 
 Flash   Active Directory   Windows