This site is a testing version, but all data is shared with the live forum.


Raised This Month: $ Target: $400
 0% 

7zip batch bzipping


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Rizla
SourceMod Donor
Join Date: Jun 2010
Old 06-03-2013 , 05:06   7zip batch bzipping
Reply With Quote #1

just a quick script I threw together, it will batch convert bsp files to bzip2 for fast download, thought I'd share as i know how annoying it can be bzipping multiple files for fast downloads.

easily editable, feel free to cut/paste/edit/improve. its a really simple script in a language im not brilliant at.

just requires 7zip (its the only one i know that bzips)

open up the file (in notepad++ preferably) and set the path to your 7z exe

set bzipper="full path to the exe"

run it, enter the full directory you want and it'll take care of the rest. this can be edited to do model files as well or any other content that you'd like bzipping

as i said, just thought id share, its simple but can be timesaving
Attached Files
File Type: zip bzip.zip (595 Bytes, 109 views)
Rizla is offline
Zephyrus
Cool Pig B)
Join Date: Jun 2010
Location: Hungary
Old 06-03-2013 , 05:07   Re: 7zip batch bzipping
Reply With Quote #2

1. get bzip2.exe and put it in the same directory as all the files (http://gnuwin32.sourceforge.net/packages/bzip2.htm)
2. bzip2.exe -k * (dont use -k if you dont want to have the originla files after zipping)
3. done
__________________
Taking private C++/PHP/SourcePawn requests, PM me.

Last edited by Zephyrus; 06-03-2013 at 05:08.
Zephyrus is offline
NinjaSK
Senior Member
Join Date: Sep 2012
Old 06-03-2013 , 07:42   Re: 7zip batch bzipping
Reply With Quote #3

Zephyrus method is way more simple, how come I never thought of that lol!

Thanks for the script Rizla, I learned some stuff from it
NinjaSK is offline
MPQC
SourceMod Donor
Join Date: Dec 2011
Old 06-03-2013 , 08:04   Re: 7zip batch bzipping
Reply With Quote #4

Here's a copy of what I use. It uses a batch file similar to what Zephyrus said. Just place files inside the files folder, then run the batch file "zip_files".
Attached Files
File Type: zip bzip.zip (31.2 KB, 74 views)
__________________
MPQC is offline
Fearts
ferts of daeth
Join Date: Oct 2008
Old 06-03-2013 , 08:40   Re: 7zip batch bzipping
Reply With Quote #5

Code:
@Echo Off
:Start
If [%1==[ Goto :EOF
PushD %~pd1
"C:\Program Files\7-Zip\7z.exe" u -tbzip2 %~nx1.bz2 %1
Shift
PopD
Goto Start
^I just make this into a .bat file and then just drag and drop all the files I wish to bzip2 onto the .bat file.
__________________
Fearts is offline
winniethepooh
SourceMod Donor
Join Date: Sep 2012
Old 06-04-2013 , 06:28   Re: 7zip batch bzipping
Reply With Quote #6

I'm not sure about bzip2.exe, but the 7z one by default uses all available threads and is capable of capping the CPU. I wouldn't recommend running it in a server environment unless you restrict the number of threads.

On 7zip 9+ you can restrict the threads using -mt# where # is the number of threads
winniethepooh is offline
nope.avi
Senior Member
Join Date: Jan 2012
Location: Australia
Old 06-04-2013 , 18:02   Re: 7zip batch bzipping
Reply With Quote #7

Hey did you steal this from me?
I made one last year but its over at the FreakFortress2 sub-forum.
Looks a bit like mine.
__________________
I quit the FF2 business, I can only provide some assistance and feedback. I was previously a 3D modeler, texture artist and boss maker.
nope.avi is offline
Rizla
SourceMod Donor
Join Date: Jun 2010
Old 06-05-2013 , 04:27   Re: 7zip batch bzipping
Reply With Quote #8

no, wrote it myself from scrath in about 10 minutes, trouble is with things like this is that theres only one way to do it really
Rizla is offline
nomy
Senior Member
Join Date: Dec 2009
Location: United Kingdom
Old 06-05-2013 , 12:29   Re: 7zip batch bzipping
Reply With Quote #9

I've been using this for a few years now.
Attached Files
File Type: zip AceBzip2.zip (538.5 KB, 76 views)
nomy is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 12:59.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode