LinuxQuestions.org
Have you heard the LinuxQuestions.org Podcast?
Go Back   LinuxQuestions.org > Forums > Linux > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Tags used in this thread
Popular LQ Tags , ,

Reply
 
Thread Tools
Old 09-26-2009, 09:36 AM   #1
ebolamayinga
LQ Newbie
 
Registered: Sep 2009
Posts: 2
Thanked: 0
Question extracting multiple files into subfolders


[Log in to get rid of this advertisement]
hi there,

i want to extract multiple .zip files into subfolders based on the name of the zip file. (like using the "extract to subfolders" function of winrar's explorer integration on win).
i tried ark's konqueror integration (kde 3.5 on a gentoo machine) wich offers such a feature. on win winrar handles the zip files in a sequential order (i.e. one zip file after another). ark did that paralelly. the problem now is that after the smallest of these zip files is finished all instances of ark are being killed automatically and the other zip files extraction is incomplete.
anyone got a solution to this? (e.g. a bash script to do the job?)
thx in advance!
greets,
ebola
linuxgentoo ebolamayinga is offline     Reply With Quote
Old 09-26-2009, 02:12 PM   #2
clvic
Member
 
Registered: Feb 2008
Location: Rome, Italy
Distribution: OpenSuSE 10.x, vectorlinux, slax
Posts: 171
Blog Entries: 1
Thanked: 14
A bash script? Try this one, that unzips all zip files that are in a single folder, each one in its folder. Then, directly from the command line, type:

for i in *.zip; do echo $i; mkdir "`basename "$i" .zip`"; unzip "$i" -d "`basename "$i" .zip`"; done

The script is full of " because of the possibility that filenames contain spaces.
linux clvic is offline  
Tag This Post , ,
Reply With Quote
Thanked by:
Old 10-02-2009, 05:47 PM   #3
ebolamayinga
LQ Newbie
 
Registered: Sep 2009
Posts: 2
Thanked: 0

Original Poster
thx a lot. exactly what i needed.
linuxgentoo ebolamayinga is offline     Reply With Quote

Reply

Bookmarks


Thread Tools

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 Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Cannot see files in subfolders of Windows server Mountain Linux - Newbie 2 03-30-2008 09:40 PM
Permissions propagating to subfolders & files linus Linux - General 2 06-21-2007 01:58 PM
extracting multiple files with tar -xjvf logicalfuzz Linux - Software 3 11-06-2005 02:21 AM
need a script to delete all files from a folder and subfolders cccc Programming 1 03-04-2005 11:54 AM
changeing permissions for a folder + subfolders and files ? YBA^[x] Slackware 7 08-06-2004 05:07 AM


All times are GMT -5. The time now is 11:02 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
RSS2  LQ Podcast
RSS2  LQ Radio
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration