How to Bulk Save to Files Without Filename Prompt for Every File

I have a lot of drafts I want to export to iCloud Drive. The Save to Files action prompts for the name of every draft being exported. Is there a way to avoid that? It already has a file name.

(The save to iCloud Drive action gives me an error so I’m guessing it’s outdated and was replaced by save to files?)

Have you looked through all the previous answers to this sort of question?

Also, when you say you get an error with a save to iCloud Drive action, you don’t actually tll us exactly which action that is or what your error is, making it hard to guess what is going on.

Yes, searching the forum was the first thing I did. But there are many replies and nothing seemed to match the problem I was having.

The Save to iCloud Drive action is the one by agiletortoise:

It works with a single draft, but fails with multiple drafts for me.

Here’s a screen capture video: Dropbox - drafts-save-to-iCloud-Drive-error.MOV - Simplify your life

I think I found the cause. The action uses Create, which fails if the filename exists. Using the timestamp appears to generate multiple files with the same name.

Changing the action to use Replace avoids the issue.

Maybe there should be two separate actions? One called single file which uses create, and one for multiple files which uses replace. I don’t know if it’s possible to prompt for a different filename when there is a filename conflict.

1 Like

You can alter the action to provide a different file naming scheme. The default example version uses time to the second, which is obviously not unique enough if you are bulk exporting quickly.

Most use [[safe_title]] to use the first line of the draft and have something more identifiable in the resulting file.

Or, if you like a timestamp, and want to do bulk, you would need more specificity than “seconds” to avoid a collision. You could use a filename template tag that includes milliseconds in the name and you’d probably be fine. Like [[time|=yyyy-MM-dd HH-MM-SS-SSS]].

1 Like

Thanks, [[safe_title]] will work best for my use case.