次の方法で共有


Compressing as Individual Files in Folder

Let’s see how long it takes Jim Christopher to jump in with a better PowerShell solution.  :)

I had a directory full of .avi files that contains RAW, uncompressed data at 60fps from a camera (for astroimaging).   Even capturing just a few minutes of data amasses  over 10GB of data:

image

 

 

 

No wonder my drive filled up so quickly.  For archiving the data, I wanted to zip each file into its own file, not into a folder.  Because I had about 50GB of videos to do, I wanted a simple cmd to do it for each folder.  This is pretty easy to do with 7-Zip. 

Bring up a command prompt in the folder you’d want each file to be individually zipped:

image

 

 

 

 

 

 

 

 

 

Assuming you have 7-Zip installed in its default location, use a command like:

 for %I in ("*.avi") do "c:\Program Files\7-Zip\7z.exe" a "%I.zip" "%I" -mx=5 -mmt=4 –tzip
  

You’ll see the progress in the command prompt:

image

You can, of course, tweak that as necessary.   This compresses each file nicely, now consuming about 1.6GB. 

image

 

 

 

This is a handy way to zip up large number of files into individual archives!