Match creation dates of exported files to Scrivener dates

I’m new to Scrivener and this forum but to the best of my (search informed) knowledge this request has not previously appeard in the Wish List. I hope I’m right.

I would like to be able to retain some metadata when I export content out of Scrivener. When I am using Scrivener as a note tool (or when content of a writing project includes notes of use to me outside of Scrivener) I want to export text to various file-based note collections on my hard drive. At present when I export text from Scrivener files are created with creation dates set to when they were exported. What would be useful to me would to be able to cause exported files to have creation and modification dats that match their creation and modification dates inside Scrivener. When all exported files appear on the hard drive with the same creation date their usefullness (to me) is severly limited. Would it be possible to include an option in the Export dialog box to “Match file dates” (or some such label) that, when checked, caused the files created with the export to have creation and modificaiton dates matching the creation and modification dates of the analogous Scrivener texts?

A related request would be to be able to select an option which would cause the keywords associated with a Scrivener text to be exported into the Spotlight comment field of the resulting (exported) file. This would allow me to use the same set of tags both inside and outside of Scrivener.

By the way, I am thrilled to have found Scrivener. You have created something of tremendous use. Thanks!


You can of course export keywords, creation, and modified date within the text of the export, thus allowing you to effectively retain all meta-data. Make sure you have the meta-data flag selected beside all the Binder types you wish, in the Export Draft function. Additionally, when using Export Files, making sure the meta-data checkbox is set will accomplish meta-data retention.

I agree with Maria on where keywords should go, if such a system were ever employed. Spotlight, to my knowledge, already does search the RTF keywords area, so it would still get picked up without setting the global Spotlights comment field. However, I would have to question how this would be populated? In the case of Export Files, where each Binder item becomes an file on the hard drive, it would make sense to put keywords into RTF keywords (assuming you are doing an RTF export in the first place). However, what if you are exporting the entire draft, which is composed of potentially hundreds of Binder items, each with their own keywords? The result of this format mode is one single file.

Setting creation and modified dates to the internal ones is a good idea, though it should probably be a preference somewhere, as other people might want things to be more literal. This file was created today, even if the content was not. It all depends on how you sort things.

Unfortunately I don’t think this quite does what I intend. My goal is to (at times) export text units from Scrivener (individual units of text, whatever they are called in Scrivener) into their own individual files with the metadata associated with only that particular Scrivener text unit. What you describe seems to me to only work when combinging the text units in the Draft folder into a combined file.

The option to “Export meta data” in the “Export files…” function doesn’t quite do it either; it creates a separate file to contain the metadata which sits alongside the exported file (the metadata file is named _MetaData.txt).

Am I missing something? Is there a way to use the Export Draft function you describe to export individual Scrivener text “units” (what should I call them?) each to their own indivudual file on the hard drive with the metadata included in the file? Since I append a special character to my tags (even inside Scrivener) it doesn’t really matter to me if the tags are placed inside the body of the text file or in other (Spotlight searchable) structures in the file––I can use them in Spotlight searches in either case.

But the metadata request is a secondary issue for me. What would really be most helpful to me (and to others I hope) would be to have an option to set exported files (when using the “Export files…” command) to have a creation date that matches the creation dates of the text units being exported. If nothing can be done to include an option to export keywords into the files there is a workaround: one can drag keywords into the body of these text notes before exporting them (drag from the HUD or from the keywords area works quite well).

No, you are not missing anything. My response was unintentionally more geared toward the retention of data, than Spotlight compatibility. With the latter goal in mind, there is no good “out of the box” solution. As you put it, Draft can only export a single file, destroying the units of information concept, and exporting files separates meta-data from the unit. I have never really given any thought about it. The side-car file idea made sense to me because I am used to Photoshop’s XMP side-car file option.

I am afraid I do not have a better solution than the laborious one you provide. To enhance the idea further, you could set the keywords to be an annotation; that would at least make it easy to exclude them from exports, if you wished.

I wonder if there is anyone here who is well versed in AppleScript? It would seem to be a relatively simple task to create a script which merges the side-car files with the data files.

Given that exported files are created at the time of export, they naturally take on, in the Finder, the date they were physically created. Whilst I understand and appreciate this request, I have to say that this is unlikely to change (and I’m not sure it could be changed) - sorry. :slight_smile:
All the best,