Home Action Replay Page Forum Index Home Action Replay Page
Home Action Replay Page
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Batch convert 7zip to zip

 
Post new topic   Reply to topic    Home Action Replay Page Forum Index -> General
View previous topic :: View next topic  
Author Message
DRN



Joined: 17 Mar 2005
Posts: 74
Location: Somerset, UK

PostPosted: Tue Jul 11, 2006 12:08 pm    Post subject: Batch convert 7zip to zip Reply with quote

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
View user's profile Send private message
Chad
Supereditor


Joined: 05 Jan 2005
Posts: 810

PostPosted: Tue Jul 11, 2006 3:25 pm    Post subject: Reply with quote

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
View user's profile Send private message
MJS
System Leader


Joined: 12 Feb 2005
Posts: 177
Location: Buenos Aires, Argentina

PostPosted: Wed Jul 12, 2006 12:05 am    Post subject: Reply with quote

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
View user's profile Send private message
DRN



Joined: 17 Mar 2005
Posts: 74
Location: Somerset, UK

PostPosted: Wed Jul 12, 2006 7:23 am    Post subject: Reply with quote

Thanks guys, I'll give one of these a go.
_________________
Darren
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Home Action Replay Page Forum Index -> General All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group