Skip to main content
Became Hot Network Question
edited text, improved the example
Source Link
turzifer
  • 155
  • 1
  • 8

I have this folder/file structure

parent folder
--subfolder1
  -sub-subfolder
  -file1
  -file2
--subfolder2
  -sub-subfolder
  -file1
  -file2
...

I want to:

  • create zip files from the contents of the subfolders. which means, file1 and file2 will be zipped, not the enclosing subfolder. name

    create zip files from the contents of the subfolders. which means, file1, file2, and sub-subfolder will be zipped, but not the enclosing subfolder.

    each zip file with the name of the folder, like subfolder1.zip,
  • name each zip file with the name of the folder, like subfolder1.zip, subfolder2.zip...

    subfoltder2.zip...

I'd prefer that the zip files remain in the related subfolder so it will be:

parent folder
--subfolder1
  -sub-subfolder
  -file1
  -file2
  -subfolder1.zip
--subfolder2
  -sub-subfolder
  -file1
  -file2
  -subfolder2.zip
...

I am hoping that it would be possible with Automator but had no success till now.

My searches for a solution resulted in solutions that zip every folder individually with the folder itself, which in this case is not useful for me. I need the contents of the folders to be zipped.

Any ideas?

I have this folder/file structure

parent folder
--subfolder1
  -file1
  -file2
--subfolder2
  -file1
  -file2
...

I want to:

  • create zip files from the contents of the subfolders. which means, file1 and file2 will be zipped, not the enclosing subfolder. name each zip file with the name of the folder, like subfolder1.zip, subfoltder2.zip...

I'd prefer that the zip files remain in the related subfolder so it will be:

parent folder
--subfolder1
  -file1
  -file2
  -subfolder1.zip
--subfolder2
  -file1
  -file2
  -subfolder2.zip
...

I am hoping that it would be possible with Automator but had no success till now.

My searches for a solution resulted in solutions that zip every folder individually with the folder itself, which in this case is not useful for me. I need the contents of the folders to be zipped.

Any ideas?

I have this folder/file structure

parent folder
--subfolder1
  -sub-subfolder
  -file1
  -file2
--subfolder2
  -sub-subfolder
  -file1
  -file2
...

I want to:

  • create zip files from the contents of the subfolders. which means, file1, file2, and sub-subfolder will be zipped, but not the enclosing subfolder.

  • name each zip file with the name of the folder, like subfolder1.zip, subfolder2.zip...

I'd prefer that the zip files remain in the related subfolder so it will be:

parent folder
--subfolder1
  -sub-subfolder
  -file1
  -file2
  -subfolder1.zip
--subfolder2
  -sub-subfolder
  -file1
  -file2
  -subfolder2.zip
...

I am hoping that it would be possible with Automator but had no success till now.

My searches resulted in solutions that zip every folder individually with the folder itself, which in this case is not useful for me. I need the contents of the folders to be zipped.

Any ideas?

edited tags
Link
anki
  • 11.9k
  • 7
  • 35
  • 71
Source Link
turzifer
  • 155
  • 1
  • 8

Zip the contents of every sub-folder in a folder in Mac automatically

I have this folder/file structure

parent folder
--subfolder1
  -file1
  -file2
--subfolder2
  -file1
  -file2
...

I want to:

  • create zip files from the contents of the subfolders. which means, file1 and file2 will be zipped, not the enclosing subfolder. name each zip file with the name of the folder, like subfolder1.zip, subfoltder2.zip...

I'd prefer that the zip files remain in the related subfolder so it will be:

parent folder
--subfolder1
  -file1
  -file2
  -subfolder1.zip
--subfolder2
  -file1
  -file2
  -subfolder2.zip
...

I am hoping that it would be possible with Automator but had no success till now.

My searches for a solution resulted in solutions that zip every folder individually with the folder itself, which in this case is not useful for me. I need the contents of the folders to be zipped.

Any ideas?