-1

i would like to know how to get all single .bak (or anyother extension) files into a directory, and zipping them (one by one) and save them using the same name, changing only extension.

Thanks

stighy
  • 911
  • 8
  • 21
  • 31
  • Going to need more information than that, or clarify the question. What do you mean by "all single files into a directory" and from where? – Nixphoe Jun 18 '12 at 15:19
  • Suppose i have a directory with 100 bak files: i would like to zip all 100 files (into 100 different zip archive). – stighy Jun 18 '12 at 15:20
  • SvenW: the first one.. file1.bak into file1.zip, file2.bak into file2.zip – stighy Jun 18 '12 at 15:20

1 Answers1

4

For unixoid systems, see this.

On Windows, try something like this in cmd.exe:

for %f in (*.bak) do zipper_software %f %f.zip 

The exact syntax for this command will depend on the zip software you use. Note that you likely will end up with archive file names like file1.bak.zip.

Sven
  • 97,248
  • 13
  • 177
  • 225