DynV Posted March 25, 2012 Report Share Posted March 25, 2012 I have a custom program (batch file) which make daily logs. I keep the original just in case but I use a summary of it which is made from pruning the original file (threough regex & other replacements) making an uncompressed file about the 1/3 of the (original) size. After I created the summary I'd like to compress the original (keeping it just in case, will seldomly be used). I made an archives folder inside the logs folder which I moved 3 (original) file just after (its creation). I then remembered about tweaking with folder properties and seeing comthing about compression ; I checked "Compress contents to save disk space" in Advanced. Curiosity got the better of me and I really wanted to see how it did compared to a "regular" archive file.stumbling on Compression ratio of Windows file compression so I tried the command Compact but I got for result>compact archives\Listing .\archives\New files added to this directory will be compressed.Of 0 files within 1 directories0 are compressed and 0 are not compressed.0 total bytes of data are stored in 0 bytes.The compression ratio is 1.0 to 1.>dir archivesDirectory of .\archives24/03/2012 04:35 PM <DIR> .24/03/2012 04:35 PM <DIR> ..21/03/2012 11:59 PM 1,063,983 pinger-60-120321.txt22/03/2012 11:59 PM 1,232,328 pinger-60-120322.txt24/03/2012 12:00 AM 1,235,511 pinger-60-120323.txt3 File(s) 3,531,822 bytes2 Dir(s) 20,409,688,064 bytes freeand as you can see the folder contained files so somethign was wrong with the command I then moved inside the directory and had another try>compactListing \archives\New files added to this directory will be compressed.1063983 : 1063983 = 1.0 to 1 pinger-60-120321.txt1232328 : 1232328 = 1.0 to 1 pinger-60-120322.txt1235511 : 1235511 = 1.0 to 1 pinger-60-120323.txtOf 4 files within 1 directories1 are compressed and 3 are not compressed.3,531,870 total bytes of data are stored in 3,531,870 bytes.The compression ratio is 1.0 to 1.I then thought it could have been because the files were already there co forced compaction>compact /c /f *.*Compressing files in \archives\pinger-60-120321.txt 1063983 : 266240 = 4.0 to 1 [OK]pinger-60-120322.txt 1232328 : 307200 = 4.0 to 1 [OK]pinger-60-120323.txt 1235511 : 307200 = 4.0 to 1 [OK]4 files within 1 directories were compressed.3,531,870 total bytes of data are stored in 880,688 bytes.The compression ratio is 4.0 to 1.>compactListing \archives\New files added to this directory will be compressed. 1063983 : 266240 = 4.0 to 1 C pinger-60-120321.txt 1232328 : 307200 = 4.0 to 1 C pinger-60-120322.txt 1235511 : 307200 = 4.0 to 1 C pinger-60-120323.txtOf 4 files within 1 directories4 are compressed and 0 are not compressed.3,531,870 total bytes of data are stored in 880,688 bytes.The compression ratio is 4.0 to 1.but later I moved a new file (original log, not summary) inside the compressed folder but it seem it wasn't compressed>compactListing \archives\New files added to this directory will be compressed. 1063983 : 266240 = 4.0 to 1 C pinger-60-120321.txt 1232328 : 307200 = 4.0 to 1 C pinger-60-120322.txt 1235511 : 307200 = 4.0 to 1 C pinger-60-120323.txt 1234703 : 1234703 = 1.0 to 1 pinger-60-120324.txtOf 5 files within 1 directories4 are compressed and 1 are not compressed.4,766,573 total bytes of data are stored in 2,115,391 bytes.The compression ratio is 2.3 to 1. Is there comthing I don't understand about NTFS compressed folder? I thought those were folder which added files were automatically compressed. Please help. Thnak you kindly Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.