4 Replies Latest reply on Oct 9, 2016 4:16 AM by Obi-wan Kenobi

    Possible to generate date (as text variable?) based on filename?


      I have what feels like should be a simple question, but no matter what I search for here or elsewhere, can't seem to find an answer. Any help would be very greatly appreciated.


      I work for a weekly publication, and am trying to autogenerate the date in the folio of each page, so that there's no room for human error in re-typing dates and page numbers every week. Page numbers are easy, of course, using text variables, but the date needs to be set to our publication date throughout the whole process — meaning, if I make a proof on Monday, it needs to have the Thursday publication date, not that current date, not a last-modified, or last-output date.


      Ideally, I'd like to figure out a way for InDesign to look at the filename (which includes the date) and autogenerate the text in a box based on that. For instance, our naming convention for Page 1 would be:


      0610_EPV_001 (wherein the first four digits are the publication date, October 6 — for what it's worth, I can easily rearrange this convention if that makes any solution easier)


      Is this possible, via any sort of script out there? I am a complete novice at scripts, so while I suspect it or something like it accomplishing the same thing may be a relatively simple ask for an experienced script user/writer, it wouldn't be for me... so if you have ideas, detailed instructions (or a link to same) would be an enormous help. Thanks in advance for any help anyone can lend!