WindowsFileHistoryCleaner
WindowsFileHistoryCleaner copied to clipboard
Simple command line executable to turn a File History share back into a snapshot of files
Windows File History Cleaner
Simple commandline executable to turn a File History share back into a snapshot of files
Sample command:
FileHistoryCleaner remove-history
--root "C:\BACKUP"
--recursive
--rd "(\\node_modules$|\\\$tf$|\.git$|\\locallow$|\\bin$|\\obj$|packages$)"
--rf "(\.DS_Store|.lnk$|\.exe$|\.msi$|\.iso$|\.dll$)"
--verbose
--force
--whatif
--rootpoints to the root of a File History share (or copy of one)--recursivetraverses all sub directories--rddeletes directory recursively if it match the supplied regex. Be careful of the escape rules of both your commandline processor and regex.--rfdeletes files if it match the supplied regex. Be careful of the escape rules of both your commandline processor and regex.--verboseoutputs more logs--forcedelete instead of move to the recycle bin--whatifOutput actions, but do not actually perform them
History
I wrote this little tool after my NAS became inaccessible. While taking a backup of the drives I found out the File History Snapshot of my laptop had grown beyong 1.4TB.
By running this little cleanup tool I managed to return the snapshot to 60GB of only the latest versions of every file.