Search, Windows Explorer and More in Windows Vista
(Page 1 of 5 )
In this conclusion to a three-part series covering the Windows Vista filesystem, we focus on search and Windows Explorer, and touch on several other features as well. It is excerpted from chapter four of the book
Windows Vista in a Nutshell, written by Preston Gralla (O'Reilly, 2006; ISBN: 0596527071). Copyright © 2006 O'Reilly Media, Inc. All rights reserved. Used with permission from the publisher. Available from booksellers or direct from O'Reilly Media.
NTFS Compression Utility
\windows\system32\compact.exe
View or configure the automatic file compression on NTFS drives.
To open
Command Prompt -> compact
Usage
compact [/c | /u] [/s[:dir]] [/a] [/i] [/f] [/q] [filename]
Description
One of the features of the NTFS filesystem (see "FAT to NTFS Conversion Utility," in Chapter 11) is its support for automatic compression of individual files; older files can be optionally compressed to take up less disk space at the expense of speed to access them.
Right-click on any file or folder, select Properties, and then click the Advanced button. The "Compress contents to save disk space" option is used to instruct Windows to compress the selected item. If a folder is selected, all of its contents will be compressed (you'll be prompted about any subfolders); furthermore, any files added to that folder will be automatically compressed as well.
The NTFS Compression Utility is the command-line equivalent of this setting, useful for automating the compression or decompression of several files with the help of a WSH script or batch file. The NTFS Compression Utility takes the following options:
filename
Specifies a file, folder, or group of files (using
wildcards) to compress or uncompress.
/c Compresses the specified file(s). If a folder is
specified for filename , the folder will be marked
so that subsequent files added to the folder will
be compressed automatically. Include the /s
parameter to compress files already in the folder.
/u Uncompresses the specified file(s). If a folder is
specified for filename , the folder will be marked
so that subsequent files added to it will not be
compressed automatically. Include the /s
parameter to uncompress files already in the
folder.
/s If a folder is specified for filename , the /c
and /u parameters will act only on new files
added to the folder. Include the /s parameter as
well to compress or uncompress files already in
the folder. If filename is omitted, use the /s
option to act on all files in the current folder.
/a Includes files with hidden or system attributes
set; otherwise, ignored by compact. exe.
/i Ignores errors; otherwise, compact.exe will stop
when the first errors are encountered.
/f Forces compression on all specified files;
otherwise, files that are already compressed will
be skipped.
/q Quiet mode; use this option to report only the
most essential information.
If you run the NTFS Compression Utility without any options, it will display the compression settings for the current directory and all of its contents.
Notes
- This type of file compression is supported on NTFS drives only.
- Go to Windows Explorer -> Organize -> Folder and Search Options -> View tab and turn on the "Show encrypted or compressed NTFS files in color" option to visually differentiate such files from unencrypted, uncompressed files.
- For tangible proof that a given folder or file is actually compressed, right-click on it in Explorer and select Properties. If the "Size on disk" value is less than the "Size" value, the item is compressed.
See also
"FAT to NTFS Conversion Utility," in Chapter 11
Next: OpenFiles >>
More BrainDump Articles
More By O'Reilly Media
|
This article is excerpted from chapter four of the book Windows Vista in a Nutshell, written by Preston Gralla (O'Reilly, 2006; ISBN: 0596527071). Check it out today at your favorite bookstore. Buy this book now.
|
|