Tuesday, August 1, 2017

windows - How do I reinforce compression options?


Shortly after I got my computer, I enabled NTFS compression on it, selecting the option to compress "all files and subfolders". I recently noticed that several folders on my PC are not compressed anymore, including "Program Files" and "Windows". I suspect this happened when I installed Windows 8.1.


The problem is, the only way I can think of to fix this would be to uncheck the tick box under "Properties" for my drive, thus decompressing everything on my drive, and then re-check it with the "all files and subfolders" option.


Is there a way to compress all the uncompressed folders without first decompressing the compressed folders?


Answer



I personally don't care much about NTFS compression, the gains are negligible.


The following source (MaximumCompression) tested several different compression algorithms and programs. The NTFS compression is dead last (excluding no compression whatsoever) in regards to compression ratio, and has a pretty lousy efficiency, according to the author.


There are also performance aspects regarding compression. You shouldn't compress Windows or System32 folders as the NTFS drivers aren't fully read at startup and as such, the compression algorithm isn't loaded (I would however assume that Windows would prevent that from happening, to a normal user).


If I recall, NTFS compressed files have a blue name indicating that they are compressed.


All this being said... why not double-check (i.e. uncheck then check then apply)? That might trick your updated Windows installation to recognize the compressed files.




I digged a little and I found the following post (If I use “compact” to compress a NTFS drive, how can I avoid compressing compressed files?), that tells of a possible command that might do what you want.


Adapting to your needs, the following should work


compact e: /s /c /i /f

Describing each option:



  • compact - Compress files or folders on an NTFS partition

  • e: - The drive, folder or file you want to compress

  • /s - Compresses all files in the given directory and in all subdirectories

  • /c - Compresses the specified files. The directories are marked so that newly added files will also be compressed

  • /i - Continue the operation regardless of errors

  • /f - Forces the compression operation, even for files that have been compressed


I got all this info running compact /?. As I said, use this at your own risk.


Also, be aware that compact runs through explorer.exe, as noted in COMPACT /U command does not decompress large 25GB file. (see Keltari's comment to his answer)


No comments:

Post a Comment

hard drive - Leaving bad sectors in unformatted partition?

Laptop was acting really weird, and copy and seek times were really slow, so I decided to scan the hard drive surface. I have a couple hundr...