LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Zip many Files separately (https://www.linuxquestions.org/questions/linux-software-2/zip-many-files-separately-416244/)

bhuwan 02-16-2006 05:46 PM

Zip many Files separately
 
Zip many files in a directory separtely
i.e. files in directory:

foo1.wmv
foo2.wmv
foo3.wmv

<Comand I dont know goeshere>

Final result:
foo1.zip
foo2.zip
foo3.zip

arsham 02-16-2006 05:58 PM

gzip foo{1,2,3}.wmv
makes .gz files

gilead 02-16-2006 06:01 PM

Does it have to be zip? For example bzip2 will do it with:
Code:

bzip2 *
You can decompress with:
Code:

bzip2 -d *

pljvaldez 02-16-2006 06:04 PM

Go into the directory with the files and try this:

Code:

for i in *; do zip `basename $i .wmv`.zip $i; done
Note that those are back quote (on the ~ key)

I'm not sure wmv's will compress too far though...

bhuwan 02-16-2006 06:16 PM

:D
Quote:

Originally Posted by pljvaldez
Go into the directory with the files and try this:

Code:

for i in *; do zip `basename $i .wmv`.zip $i; done
Note that those are back quote (on the ~ key)

I'm not sure wmv's will compress too far though...

works! I am not considered about compression :_)
Thanks a lot to all!:Pengy: :newbie:


All times are GMT -5. The time now is 06:54 PM.