Save diskspace and zip folder contents using 7zip

Ever got annoyed with your disk filling up with big database backups, text files or other compressable data? 7-Zip to the rescue! Save diskspace and zip folder contents using 7-Zip!

With the following oneliner you backup all files in a seperate ZIP file and delete the files after:

dir *.[bak/txt/dmp] | ForEach-Object { & "C:\Program Files\7-Zip\7z.exe" a -tzip ($_.Name+".zip") $_.Name }

To make your life more easy, download your copy of 7ZIP here

Easy peasy lemon squeezy!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.