Automatically compress files to NTFS LZX compression with minimal disk write cycles.
Syntax: LZXAuto [/log:mode] [/resetDb] [/scheduleOn] [/scheduleOff] [/? | /help] [filePath]
Options:
/log: [None, General, Info, Debug] - log level. Default value: Info None - nothing is outputted General - Session start / end timestamp, skipped folders Info - General + statistics about current session Debug - Info + information about every file
/resetDb - resets db. On next run, all files will be traversed by Compact command.
/scheduleOn - enables Task Scheduler entry to run LZXAuto when computer is idle for 10 minutes. Task runs daily.
/scheduleOff - disables Task Scheduler entry
/? or /help - displays this help screen
filePath - root path to start. All subdirectories will be traversed. Default is root of current drive, like c:.
Description: Windows 10 extended NTFS compression with LZX alghorithm. Files compressed with LZX can be opened like any other file because the uncompressing operation is transparent. Compressing files with LZX is CPU intensive and thus is not being done automatically. When file is updated, it will be saved in uncompressed state. To keep the files compressed, windows Compact command needs to be re-run. This can be done with Task Scheduler.
There is a catch with SSD drives though. When Compact command is being run on file already LZX-compressed, it will not try to recompress it. However, if file is not compressible (like .jpg image), Compact will try to recompress it every time, writing temp data to disk.
This is an issue on SSD drives, because of limited write cycles. LZXAuto keeps record of file name and its last seen size. If the file has not changed since last LZXAuto run, it will be skipped. This saves SSD write cycles and also speeds up processing time, as on second run only newly updated / inserted files are processed.
If folder is found with NTFS compression enabled, after processing it will be marked as non-compressed. This is because LZX-compression does not use NTFS Compressed attribute.
Iterating through files is multithreaded, one file per CPU logical core. For larger file accessibility, this command should be run with Adminstrator priviledges.
Typical use: LZXAuto /scheduleOn c:\