View previous topic :: View next topic |
Author |
Message |
DRN

Joined: 17 Mar 2005 Posts: 74 Location: Somerset, UK
|
Posted: Tue Jul 11, 2006 12:08 pm Post subject: Batch convert 7zip to zip |
|
|
Not really off-topic as I'm sure someone here has been in this situation. Do any of you guys know a quick and easy way I can convert 1500 odd files from .7z format to .zip? Cheers for any help. _________________ Darren |
|
Back to top |
|
 |
Chad Supereditor

Joined: 05 Jan 2005 Posts: 811
|
Posted: Tue Jul 11, 2006 3:25 pm Post subject: |
|
|
if on windows install cygwin from cygwin.com selecting the ZIP option in the archive menu, or just use bash on linux replacing EXTENSIONHERE with the extension of the files in the 7z archives. Install 7zip of course and put 7z in path. Then:
Code: |
bash
mkdir tmp
for a in *.7z; do
7z e -otmp "$a"
done
cd tmp
for a in *; do
zip -m ../"`echo $a|sed s/.EXTENSIONHERE$//`".zip "$a"
done
cd ..
rmdir tmp
|
|
|
Back to top |
|
 |
MJS System Leader

Joined: 12 Feb 2005 Posts: 177 Location: Buenos Aires, Argentina
|
Posted: Wed Jul 12, 2006 12:05 am Post subject: |
|
|
Or use cmd and run:
Code: |
for %f in (*.7z) do @(echo converting %f... & ren %f %~nf.zip) |
replacing the rename command with the sequence of commands required to do the conversion, of course.
Just tried it with Windows 2000 and it works.
It should be the same or similiar for XP/2003. |
|
Back to top |
|
 |
DRN

Joined: 17 Mar 2005 Posts: 74 Location: Somerset, UK
|
Posted: Wed Jul 12, 2006 7:23 am Post subject: |
|
|
Thanks guys, I'll give one of these a go. _________________ Darren |
|
Back to top |
|
 |
|