Compression Question (zipping in particular)

sintaxera

Member
Jul 8, 2005
145
0
0
Need a little help. I don't want to spend hours doing it manually, and I've looked for a while on how to do it with no luck. Help please!

I need to go from something like this:

1.doc, 2.doc, 3.doc, 4.doc, 5.doc.....etc.

TO

1.zip, 2.zip, 3.zip, 4.zip, 5.zip.....etc (for hundreds of files)

All I have been able to find various programs to do is go from separate files like above to something where they are all archived together. Like 12345.zip

Thanks for your help!
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
Get a CLI zip tool and use some shell scripting. If you're on Windows you should be able to find some website that explains the for loops used by cmd, I'd post an example but I can never get it right.

In bash it would be as simple as:

for file in *.doc
do
zip $file.zip $file;
done

Although that'll get you file.doc.zip for the filenames, fixing that would be a little bit more work but no a lot.
 

sintaxera

Member
Jul 8, 2005
145
0
0
Well, that's an idea.....I'll look into it. Thanks! But if there's any point and click options out there for myself and my colleagues (who really aren't script people) I'd really appreciate any suggestions.
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
It's possible there's a GUI frontend for something like thait, but if you're going to be doing this kind of stuff regularly it's a good idea to learn some sort of scripting as it'll save you a ton of time.