I’m giving the trial of EagleFiler a shot, and am wondering if there is the Date Created and Date Modified Fields are editable via Applescript.
I’m trying to transfer a bunch of files from Scrivener to EagleFiler. Scrivener doesn’t appear to preserve the created/modified dates when exporting files to Finder.
All of my filenames begin with the date in the form “2011.02.27 - Title Here, Hyaa”. I want to use an applescript to go through each file, read the date at the front of the file name, and use it for the Date Created and Date Modified fields. I did a quick search of your forums and applescript page, but couldn’t find what I was looking for.
I adapted a script I’d written ages ago for Mori which I’ve attached below if you or anybody else wants to use it. It seems to work so far, though my testing’s been limited. Please feel free to improve/modify/clean it up, as I’m relatively new to scripting and just sort of cobble stuff together with the help of examples I find here and there.
Thanks. Sam.
= = = = = = = = = = = = = = = = = = =
------FOR ENTRIES (IN SELECTED ENTRIES) THAT BEGIN WITH A DATE (IN THE FORM 2011.05.15), COERCE THEIR CREATION & MODIFICATION DATES TO THE DATE CONTAINED IN THE TITLE
tell application “EagleFiler”
set theRecords to selected records of browser window 1
repeat with theRecord in theRecords
set theTitle to theRecord’s title
try
set theDate to (characters 6 thru 7 of theTitle) & “.” & (characters 9 thru 10 of theTitle) & “.” & (characters 1 thru 4 of theTitle) as string
set theDate to my date theDate
set theRecord’s creation date to theDate
set theRecord’s modification date to theDate
end try
end repeat
end tell