Folders to Palette Entries

Can I list folders in a directory with Applescript (or anything), turn that list into Palette entries (or Prompt), and when an entry is selected, use it as a variable?

Ultimately, I want to copy selected files (in Finder) into a specific folder inside /Dropbox/Favorites/, but I want to select the sub-folder using palette entries.

Is there a reason you don't want to use the Prompt for File action?


An alternative would be to use the For Each action with the Folder Contents collection, find all the folders in that (Get File Attribute action) and then use a Prompt With List action to select the folder.

1 Like

Thanks Peter! I wasn't aware these were options. I am a KM beginner, albeit a persistent one.

Unfortunately I couldn't get Prompt for File to work. I could navigate into folders but not select one to input to a variable. (I tried UTIs public.folder, and just "folder").

To be clear, I need to be able to navigate folders freely until I "submit" the directory I'm currently in, which the files (Finder's selection) will copy into.

I attempted your alternative solution (Prompt With List) but I'm not sure how to get that option of "navigating into" vs "submitting" a folder. (Which I realize I didn't make clear in the OP).

Make sure you select "Choose folder" in the action.

Edit: found it, I'm blind.. thanks!

1 Like