-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

3
  • 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, 2012 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, 2012 at 15:20
  • SvenW: the first one.. file1.bak into file1.zip, file2.bak into file2.zip
    – stighy
    Jun 18, 2012 at 15:20

1 Answer 1

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.

1
  • This was what I was going to suggest, but kudos for this answer.
    – Ash
    Jun 18, 2012 at 15:29

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .