Identify file by name for a smart rule


I am trying to identify a file by a specific name for a smart rule:

number with 1 to 5 digits _ number with 2 digits _ rest of the file name



I tried


but it didn’t work.

Can you help?


Welcome @joshua_FB

Are you trying to write an AppleScript, a smart rule, or…?


I’am trying to write a smart rule, that moves a file with a specific name to a group with the name that ist part of the file name.

So, first I need to identify the file and then I need to move the file to a database and a group within in that database.

To perform that task I had some problems. The first was to identify the file to move.

Thank you for your help.

Best regards

You’re welcome!

You should be able to do this with a Scan Name and Change Name actions with a Document String placeholder.

Identifying the part of the name ot file on, does this appear correct?

Yes I already figured out the right commands. But I don’t which placeholders I should use (see screenshot).

While it’s possible to use regular expressions, i.e., RegEx, that’s a lot of heavy lifting to learn for this particular use case.
I’d suggest this…

The asterisk is captured in the Scan Name action.
Use the Document String placeholder in the File action.