Automator : compress selected files by X batches

Hi,

I'm using Automator to compress, rename and delete files. For the moment I created a Workflow which do just that with the selected files. I usually select by batches of 10, 15 or 20 and use this.


However I would like to go further :

  • select all files in a folder -> select 55 files for example
  • automator ask for number per batch to compress -> dialogue box appear
  • I answer the number -> by 10 for example
  • the worklfow works -> so 5 compressed files are created for 55 files selected and the remaining 5 are untouched


I don't kwow if it's possible with automator but it would be a great to save time.


Could someone help me ?

Thanks



Posted on Jul 18, 2022 5:49 AM

Reply

Similar questions

2 replies

Jul 20, 2022 4:16 PM in response to Tanpopo33

This is going to be hard to do within Automator, directly. It just doesn't have the mechanism for this kind of thing - you need one set of actions to ask the user for the iteration count (e.g. 10), and that is separate from the file selection phase, and both of them need to be passed into the underlying shell script to make the moves.


Ultimately, it would be easier to move the whole thing into some more flexible system that better handles variables and loops. I'd go with AppleScript, myself, but you already have the basics of a shell-based solution.


The other gotcha is how to identify which 10 files to compress. Alphabetically? chronologically?

When adding all files you don't have to worry about that concern, but when dealing with a subset it can be important.

Aug 2, 2022 11:10 PM in response to Camelot

Hello,


Thank you for your answer and taking the time. Sorry for my late reply, I was without a computer for "a few" (too many) days and I finally got one back. So I'm finally trying again.

My files are classed alphabetically. I'm trying to learn Applescript but the variables are still stoo complexe for me. So I would like to just select them all and it would compress them automatically by batch of 10 or 15. I was thinking it was too much for automator. But I still don't know how to make the automatism in AppleScript so I'm far from it.


This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Automator : compress selected files by X batches

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.