View Single Post
invermere
Junior Member
Join Date: Nov 2011
Old 12-10-2013 , 17:32   Re: Batch file / create bz2's in mass quantities
Reply With Quote #20

I couldn't get that first script to work, so I made a slight variation. Not sure if it's a Win7 thing (?) but after doing a little research on command line and 7z command line I had to change the output pathname to get the absolute path, like the input path needs to be. Oh an also specified the Ultra compression for the archive... not sure if that's on by default. Don't ask me why, but this works for me and if anyone else has issues with the OP try this.

Code:
@Echo Off
:Start
If [%1==[ Goto :EOF
PushD %~pd1
"C:\Program Files (x86)\7-Zip\7z.exe" u -tbzip2 -mx9 %1.bz2 %1
Shift
PopD
Goto Start
I would include the batch file, but it says invalid file type, so you can just make your own and put this in there. Simply drag all the files you want to compress on to the file and it will go to town.
invermere is offline