Move a file named in a certain way into a folder with the same name

Hello ! I am asking for your help to create an “action folder” with automator that will automatically move the files according to their names into a folder with a similar name located in iCloud Drive.
Can you help me ?
Thank you !

Download the script that creates a folder action based on your description. It assumes the folders in question are level 1 depth into the iCloud Drive hierarchy and a strict names match.

Attach a folder action to move files to iCloud Drive subfolders – a creator script | Backblaze

This is extremely inconvenient to have to download a script, and even more so as a binary file.

Is there something that precludes you simply including the script in the body of your post as a code-fenced block in the normal fashion ?

If it happens to be a long script that is possibly too unwieldy to include in its entirety within a post, the portion of the script that is directly relevant to the topic can be included, with a link to a pastebin containing the full script, or an AppleScript file that can be downloaded (plain text .applescript documents are best, as these can be easily opened on any device).

It was a benevolent gesture of mine in response to the expressly stated need, out of goodwill, to assist a person free of charge by delivering as is. As to whether one accepts – let him take a spring tune on his own fiddle, and dance to it when he has done.

Benevolence is more in line with that described above, and genuine goodwill doesn’t need to be rationalised. But it is your choice and no one can—nor should—force you to consider adopting a more community-focused, accessible approach. And while there would be no truer show of beneficence than that which engages openly with the wider audience, enabling the sharing of ideas and knowledge with the greatest possible freedom is a defining feature of any forum, operating in mutual exchange that confers the greatest personal benefit through an infinite scope of reciprocity.


1 Like

The linked script in my previous reply has been updated to fix the issue where the comparison between a file-name and folder-name would persistently produce a false negative. Please re-download it and run again. Also, any feedback is welcome.

I’ve only just seen this ridiculous conversation.

@scrutinizer82, could you please include the text of any scripts in your replies? People requesting help here shouldn’t have to go off site unless there’s a very good reason. Nor should anyone else who’s interested in the problem or your solution.

There’s a very good reason.

You haven’t said what it is.