Locate NTFS compressed (or uncompressed) files on your system
I was interested in locating all the compressed files in my \Winnt (%SYSTEMROOT%) directory, as I was concerned that the Disk Cleanup utility had compressed often-used system components, which could result in a significant performance degradation.
The built-in command line utility compact.exe that is included with Win2k and XP (and perhaps NT4) produced output that I found less than useful -- it was too verbose for my purposes (I wanted to generate a list of files, one per line).
I could have written a Perl or Awk script to translate the output, but as usual I have ulterior motives so I wrote a utility that will do what I want... the result: FindCompressed.
FindCompressed will search a directory tree for compressed (or uncompressed) files and report found items to a console window. The output is suitable for use by shell scripts or other utilities that can process standard output. The exit status returned to the operating system is the number of matching items found.
Given the following directory structure,
in which the files Compressed.doc and file1.txt, and the directory Folder1 are compressed using the NTFS compression attribute, FindCompressed will produce the following output:
Search for compressed files in all subdirectories (the default action)C:>FindCompressed TestFiles
Recursive search of TestFiles for compressed files.
Found 2 compressed files in 3 items examined.
Search for uncompressed files in all subdirectories (using the -su option)C:>FindCompressed TestFiles -su
Recursive search of TestFiles for uncompressed files.
Found 1 uncompressed files in 3 items examined.
Windows 2000, or XP with one or more NTFS formatted partitions. This utility has not been tested on Windows NT or 9x/ME.