Need script to extract rar, zip and 7z files

For discussions about programming, programming questions/advice, and projects that don't really have anything to do with Puppy.
Post Reply
Message
Author
User avatar
enhu
Posts: 302
Joined: Wed 27 May 2009, 02:13
Contact:

Need script to extract rar, zip and 7z files

#1 Post by enhu »

can you help me with this please. tryingto create a script that will extract rar. zip and 7z files after it is downloaded to a particular folder.

something like this but not sure if it will work :D

Code: Select all

if [ -e *.rar *.zip *.7z ] 
then 
	unrar x *.rar /path/%d
fi

User avatar
vovchik
Posts: 1507
Joined: Tue 24 Oct 2006, 00:02
Location: Ukraine

#2 Post by vovchik »

Dear enhu,

Good information here http://www.debianadmin.com/howto-crack- ... linux.html.

[quote]If you want to unrar a list of files, you could use this command. You don’t necessarily need the quotes, but it helps when the filenames have spaces or something like that in them.

for f in *.rar;do unrar e “$f

User avatar
abushcrafter
Posts: 1418
Joined: Fri 30 Oct 2009, 16:57
Location: England
Contact:

#3 Post by abushcrafter »

[url=http://www.adobe.com/flashplatform/]adobe flash is rubbish![/url]
My Quote:"Humans are stupid, though some are clever but stupid." http://www.dependent.de/media/audio/mp3/System_Syn_Heres_to_You.zip http://www.systemsyn.com/

User avatar
jyore
Posts: 43
Joined: Sat 06 Nov 2010, 15:41

#4 Post by jyore »

You could look into python as well. I've used it to automagically extract, replace/edit files, rearchive, and also recalculate the md5. Should be plenty of info on the google, and/or the python website. Should require only a few libraries, most of which, are likely standard python libraries.

Post Reply