IPadOS shortcut - Renaming flies before saving to Dropbox

I’m trying to use Shortcuts and Keyboard Maestro in combination to streamline my photo workflow. I want to import photos into my iPad, rename each one, then upload it to Dropbox. Once the files get to Dropbox, I can use KM to sort into subfolders by date taken.

I’m stuck on how to rename each file then upload the renamed file to Dropbox. I need to take 50 pics, rename them with a file name I input at the start of the workflow, then upload the files. Filenames would be things like “football-vs-Springfield 1.jpg,” “football-vs-Springfield 2.jpg,” and so on.

I think it must be possible, but I can’t get the order of actions right. Can anyone help me figure out when to ask for the input, when to start and end the “repeat for each” command, etc?

See if this get’s you on the right track.

It gets you to select multiple photos, then enter the base filename. After that it loops through the selected photos and sets the name of each to the base filename followed by a space, followed by the index number of which photo in the sequence it is; note there’s no leading zeros here ( “1”, not “01”). With the filename set, the files are output to a single folder. Trust me, for volume, you want to just have a single folder to output to and not have to specify it each time.

That’s it. Hope it helps,

Just realised, you could probably streamline further if you switched from Keyboard Maestro which presumably you are running on a schedule or manually, to Hazel, which is designed to do stuff such as auto-sorting files. I say such stuff as it can also process files in numerous other ways, but sorting is probably it’s raison d’être.

you could probably streamline further if you switched from Keyboard Maestro which presumably you are running on a schedule or manually, to Hazel

Do you every think one thing and say another? That’s what happened here. I am actually using Hazel with Shortcuts, not Dropbox. I’m using Hazel to do the sorting after upload to Dropbox.

And most importantly, you solved my problem! Thank you so much. I never would have figured that out on my own.