Configuring NTFS File and Folder Compression


Native file and folder compression is one of the many benefits of using the NTFS 5.0 file system. The compression algorithm used by NTFS is a lossless one, which results in no data loss during the compression or decompression routine. Unfortunately, this capability comes at a priceNTFS compression and EFS encryption are mutually exclusive. That is, you cannot both compress and encrypt a file or folder at the same time. See Chapter 8 for more information about EFS encryption in Windows 2000; also see Chapter 3 for additional information on file compression.

You can manage compression from the command line by running the compact command or from the Windows GUI in the applicable disk, folder, or file Properties dialog box. The following steps outline how to enable NTFS compression on a folder on your computer from within Windows.

  1. In the Properties dialog box for the folder, click the Advanced button to open the Advanced Attributes dialog box (see Figure 6.14).

    Figure 6.14. Configuring compression and/or encryption.

    graphics/06fig14.jpg

  2. Select the Compress contents to save disk space option and click OK.

  3. Click OK again to close the Properties dialog box.

  4. You might be presented with a dialog box asking you whether you want to apply the changes to just the selected folder, or to the selected folder, subfolder, and all files. Make your selection and click OK one last time to complete the process.

If you enabled compression, you will be able to see this folder (and any files and folders in the folder) displayed in blue text in Windows Explorer (see Figure 6.15). To enable this option from within Windows Explorer, click Tools, Folder Options and click the View tab. Select the Display Compressed Files and Folders with Alternate Color option.

Figure 6.15. Compressed folder displayed in blue text.

graphics/06fig15.jpg

If you want to manage NTFS compression from the command line, you can do so by using the compac t command, which has the following syntax:

 compact [{/c/u}] [/s[:dir]] [/a] [/i] [/f]         [/q] [FileName[...]] 

Table 6.2 presents the available options for use with the compact command.

Table 6.2. compact Command Options

Switch

Description

/c

Specifies that the directory or file is to be compressed.

/u

Specifies that the directory or file is to be decompressed.

/s

Specifies that the compression action is to be performed on all subdirectories of the specified directory.

/a

Specifies the display of hidden or system files.

/i

Specifies that errors are to be ignored during the compression process.

/f

Specifies that the compression operation is to be forced on the specified directory or file. This is useful in cases in which a directory is only partly compressed.

/q

Specifies that only the most essential information is to be reported .

filename

Specifies the file or directory. You can use multiple file names and wildcard characters (* and ?).

The possible outcomes of moving or copying NTFS compressed files or folders are as follows :

  • Moving an uncompressed file or folder to another folder on the same NTFS volume results in the file or folder remaining uncompressed, regardless of the compression state of the target folder.

  • Moving a compressed file or folder to another folder results in the file or folder remaining compressed after the move, regardless of the compression state of the target folder.

  • Copying a file to a folder causes the file to take on the compression state of the target folder.

  • Overwriting a file of the same name causes the copied file to take on the compression state of the target file, regardless of the compression state of the target folder.

  • Copying a file from a FAT folder to an NTFS folder results in the file taking on the compression state of the target folder.

  • Copying a file from an NTFS folder to a FAT folder results in all NTFS-specific properties being lost, so the file will be uncompressed.



MCSE Windows 2000 Server Exam Cram2 (Exam 70-215)
MCSE Windows 2000 Server Exam Cram 2 (Exam Cram 70-215)
ISBN: 0789728737
EAN: 2147483647
Year: 2003
Pages: 155

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net