Export multiple drafts as individual text files

I found myself with similar needs to the folks in this thread, and wrote a script today that bulk exports all the drafts currently visible in your drafts list. It preserves the created/modified timestamps on export to the file system, and will use the first line of each draft as the filename.

It has a couple cautionary checks to make sure you have reasonable filenames and to give you a preview of the results before executing.

This is my first Drafts script… I hope it’s helpful. Thanks to @RosemaryOrchard for the sample code above, which got me started, and @sylumer for the suggestion (in another thread) on how to preserve creation dates.

2 Likes