The four attributes are R for
read only, S for system, A for archive, and H for hidden.
In Explorer, you can right-click a file or group of files and select Properties
to change the attributes; attrib is the DOS counterpart to this functionality.
In addition, attrib lets you change the S (system) attribute,
something Explorer doesn??™t let you do.* Here are some examples:
attrib +h myfile.txt
This turns on the H parameter for the file myfile.txt, making the file
hidden.
attrib -r "another file.doc"??”
This turns off the R (read-only) parameter for the file another file.doc
(note the use of quotation marks because of the space in the filename).
Type attrib /? for additional options.
Figure 9-3. The Command Prompt is the old-school way to get things done
* The Change file attributes tool in Creative Element Power Tools (http://www.creativelement.com/
powertools/) lets you quickly add or remove any of the four standard attributes by right-clicking.
554 | Chapter 9: Scripting and Automation
cd foldername
Changes the working directory to foldername. If the prompt indicates
you are in C:\Windows and you want to enter the C:\Windows\
System32 folder, type cd system32. You can also switch to any folder
on your hard disk by including the full path of the folder. Type cd ..
to go to the parent folder. Type cd by itself to display the current
directory.
To switch to another drive, just type the drive letter, followed by a colon
(:).
Pages:
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772