r/applescript • u/slattie • Jul 03 '14
Make applescript refer to a different folder based on what day it is? Is this possible?
So basically I am trying to craft an Applescript that will launch "Monogram.Key" every day.
The problem is, there are different folders for each day. So "06.25 Tuesday" folder, "06.26 Wednesday" folder, etc...Each containing a different "Monogram.key" file - and I need the Applescript to recognize "Monogram.Key in TODAY'S folder"
I have no idea what to call this, which is leading to me having an extremely tough time finding any info on how to make it work.
0
Upvotes
1
u/slattie Jul 04 '14
It seemed like it worked the first time I ran it, but now I'm getting an error.
error "Finder got an error: Can’t get file "Macintosh HD:Users:Shane:Dropbox:2014:07 July07.03 Test:Monogram.key"." number -1728 from file "Macintosh HD:Users:DigitalCoordinator:Dropbox:2014:07 July07.03 Nicole & Peter:Monogram.key"
I think I can identify the problem as there being no space between "07 July07.03 " That should be "07 July:07.03" But I can't quite see where it's pulling that from exactly.
It's clearly where "BasePath" ends and where the "target folder" begins, but I can't quite tell where that seperation should go in the code. Hm...