I have been trying to write an Applescript to help me saving attachments, but realized quickly that I do not have the knowledge to do such a difficult script. Here is some background.
We receive daily sales reports, and flight manifests. The format in the subject should be:
dd.mm.yyyy/"two letter airline code".DSR.Weight.
In the case of the manifest, in the same format, substitute
There are however countless variations to the subject, and we are all human, and sometimes
, is used, or more
/ etc. Our staff are great and work extremely hard, and the last thing they need me to do is be on their case about subject formats.
Therefore I was trying to get an Applescript to look at the two things that are always in the subject. The airlines two letter code, and the word
We have the following two letter codes, sometimes in lower, or uppercase or a mix.
DSR can be in the subject in a number of ways, its not always seperated, ie.
Same applies for
Ideally, I need a script to work in two parts:
- Check the subject for the flight code and
- Save the .xls attachment to /DSR/Airline two letter code
- If File is more recent (A correction might be sent later that day/early the next morning.), add
1, if another
Macintosh HD/Users/(My username)/Dropbox/DSR/VS
Macintosh HD/Users/(My username)/Dropbox/DSR/CV
Manifest (Sometimes a .xls/.pdf/.zip file. It varies.)
- Check the subject for the flight code and (Manifest or MNFST or MFST)
- Save the .xls/.pdf/.zip attachment to Manifests/Airline two letter airline code
- If the file is more recent (I.e. a file conflict with the same name. A correction might be sent later that day/early the next morning.), add
1, if another
Macintosh HD/Users/(My username)/Dropbox/Manifests/VS
From the 3 hours I spent attempting this and getting nowhere fast, I thought someone might find this an interesting challenge, and it would be greatly appreciated!
Meanwhile, I am going to be reading up on Applescript in my free time, very powerful tool and time saver!