Count how many folders exist


I am in the process of trying to recreate a Mac Automator action which creates a folder name based on my requirements.

I have managed to do this but I now need to check a couple of details.

I need to check if:
• The folder exists and if it does give me an alert and stop the process
• Any folders contain certain text in the folder name
• If a folder does contain certain text, count + 1 to the number I.e. if a folder contains the text (SURN01) add 1 so the output would be (SURN02)

If you’re able to help with the 1st or 2nd of those requests, I’m sure I can work out the 3rd.

I can only see one folder action which is ‘Create Folder’ and all that does it creates the folder

Presumably you are using Shortcuts. Have you looked at the Search bookmarked folder action in Toolbox Pro?

Thank you.

I assumed that was for something like Safari bookmarks or something. I’ve upgraded to Premium and I noticed that I can select my Google Drive but it is greyed out. Is there anything I can do to allow this?

No. Only some storage providers will support bookmarking.


OK, I’ll just have to start using iCloud then.