CompTIA A_ Certification All-In-One Exam Guide, Seventh Edition - Michael Meyers [259]
Typing COMPACT again shows you the directory listing, and now there’s a C next to each filename, indicating that the file is compressed (Figure 15-34).
Figure 15-34 The contents of C:\COMPACT have been compressed.
Okay, now suppose you want to uncompress a file—say a PowerPoint file, Session 1.ppt. To do this, you must specify the decompression operation, using the /U switch and the name of the file you want decompressed, as shown in Figure 15-35. Note that COMPACT reports the successful decompression of one file only: Session 1.ppt. You could do the same thing in reverse, using the /C switch and a filename to compress an individual file.
Figure 15-35 Typing COMPACT /U “Session 1.ppt” decompresses only that file.
CIPHER
The CIPHER command is a bit complex, but in its most basic implementation, it’s pretty straightforward. Figure 15-36 shows two steps in the process. Like the COMPACT command, the CIPHER command simply displays the current state of affairs when entered with no switches. In this case, it displays the encryption state of the files in the E:\Work Files\Armor Pictures directory. Notice the letter U to the left of the filenames, which tells you they are unencrypted. The second command you can see on the screen in Figure 15-36 is this:
Figure 15-36 Typing CIPHER /E /A encrypts the contents of the directory.
E:\Work Files\Armor Pictures>cipher /E /A
This time the CIPHER command carries two switches: /E specifies the encryption operation, and /A says to apply it to the files in the directory, not just the directory itself. As you can see, the command-line interface is actually pretty chatty in this case. It reports that it’s doing the encryption and then tells you what it’s done, and it even warns you that you should clean up any stray unencrypted bits that may have been left in the directory.
To confirm the results of the cipher operation, enter the CIPHER command again, as shown in Figure 15-37. Note that the U to the left of each filename has been replaced
Figure 15-37 CIPHER command confirms that the files were encrypted.
with an E, indicating an encrypted file. The other indication that this directory has been encrypted is the statement above the file listing:
New files added to this directory will not be encrypted.
Remember that the CIPHER command works on directories first and foremost, and it works on individual files only when you specifically tell it to do so.
That’s great, but suppose you want to decrypt just one of the files in the Armor Pictures directory. Can you guess how you need to alter the command? Simply add the filename of the file you want to decrypt after the command and the relevant switches. Figure 15-38 shows the CIPHER command being used to decipher DSC_4255.dng, a single file.
Figure 15-38 Typing CIPHER /D /A DSC_4255.dng decrypts only that file.
Chapter Review
Questions
1. The ASCII standard defines how many 8-bit characters?
A. 64
B. 256
C. 512
D. 64,000
2. Which of the following is the correct path for a file named YODA.TXT on the C: drive in a directory called JEDI that’s in a directory called REBELS that’s in the root directory?
A. C:\ROOT\JEDI\YODA.TXT
B. C:\JEDI\REBELS\YODA.TXT
C. C:\REBELS\JEDI\YODA.TXT
D. C:\ROOT\REBELS\JEDI\YODA.TXT
3. Which of the following commands will delete all of the files in a directory?
A. DEL *.*
B. DEL ALL
C. DEL ?.?
D. DEL *.?
4. What command enables you to make a new directory in a Windows XP Professional system?
A. MF
B. MKFOL
C. MD
D. MAKEDIR
5. What command do you type at the Run dialog box to access the command-line interface in Windows XP?
A. CMD
B. CONAND
C. MSDOS
D. CP
6. Joey wants to change the name of a file from START.BAT to HAMMER.BAT. Which of the following commands would accomplish this feat?
A. REN HAMMER.BAT START.BAT
B. REN START.BAT HAMMER.BAT
C. RENAME /S START.BAT HAMMER.BAT
D. RENAME /S HAMMER.BAT START.BAT
7. What types of characters are the asterisk