variable folder name

My goal is to automatically trigger a folder action with a variable name. With a static name I already succeeded with the Conditional Activation Group. The variable folder names always have this structure 7004564685-2. Is there a possibility to use a wildcard or a grep command to trigger folders with this name in the Conditional Activation Group?

can you explain the use case? Maybe there is a better way

I´m receiving ZIP files with that Name from a customer which is automatically unpacked by a script on the server. The folder is then also opened by the script to get access to the files. I want it to be always placed automatically in the same place with the same dimensions. As I said, I succeeded with static names (e.g. downloads) - also in connection with SnapAreas. But because the name changes every time (because it is an increasing order number) I have to solve this somehow differently. Ideas?

I think I might be confused by the term "folder action". You are not talking about the macOS folder actions, correct? ( How to attach an action to a Mac folder for automatic workflows | Macworld)

Can you show a screenshot of what you currently have? I think I still don't really understand

Actually the task is relatively simple. When a folder with the name 700... opens I want it to be placed with the SnapArea XY. The problem is to identify the folder with the changing name 700..XX.
Screenshot is the with static name


The conditional activation group variable support the "matches" operator, which allows for regex.

To match all folders that start with 700 this would should work:

For more complex regex, I can recommend chatGPT :slight_smile:

Ah, but you want to place every folder in a different snap area, based on the name?

chatgpt is for me a mixture of awesomeness and fear of skynet

no. but I have 700...; 710...; 610....;320.... and so on.
different product lines of the same customer.
that what it would be best to identify eg 10 Numbers - 2 Numbers

that should all be easily matchable with some regex

cool. that's the hint I was looking for. I will try to frankenstein my workflow from that starting point. Thx!

1 Like