bash

bash un zip all compressed files in a directory

Posted on November 4, 2009. Filed under: bash | Tags: , , , |

this seems to work for now:
 
for file in *zip; do extdir=`basename “$file” .zip`; unzip -d “$extdir” “$file”; done
 
it will extract all the .zip files into a new directory based on the file’s name.
 
ex:
for emacs goodies1.zip
it will create a directory called “emacs goodies1″ and place all the files there.
them proceed to the next .zip file
 

Read Full Post | Make a Comment ( None so far )

Liked it here?
Why not try sites on the blogroll...