Hi all,
I would like to know if it's possible to make an applescript that checks every day a folder on desktop that contains files and folders (in particular folders with a name and a date like "Builds 20 nov 2012", "builds 21 nov 2012" etc etc with files inside) and copy the files inside last folder named "builds 21 nov 2012" (as for today, tomorrow would be "builds 22 nov 2012") depending on the date to a Folder named "last builds" on a nas server that is connected and mounted on desktop, deleting the old files on it, leaving only the last ones.
If it is possible any help would be appreciated!
Thanks,
Al

Hi all,
I would like to know if it's possible to make an applescript that checks every day a folder on desktop that contains files and folders (in particular folders with a name and a date like "Builds 20 nov 2012", "builds 21 nov 2012" etc etc with files inside) and copy the files inside last folder named "builds 21 nov 2012" (as for today, tomorrow would be "builds 22 nov 2012") depending on the date to a Folder named "last builds" on a nas server that is connected and mounted on desktop, deleting the old files on it, leaving only the last ones.
If it is possible any help would be appreciated!
Thanks,
Al

I'm pretty sure this'll work. I'm also sure there's a more elegant way to do it but this is the structure I use for my own.

Note that -in this second scenario- everytime you reboot your computer you'll need to execute the script again.

Cheers.

P.S: Please someone correct me if there's a mistake in the code or, as I stated, a better way to do it, as I'll be interested myself!

------------------------------

Added:

If you go the second way, this is what will happen:

1. You run the script on 22.11.2012 at 15.00.
2. It'll sync the folder Desktop/A/22.11.2012/ with /Volumes/NAS/LastFiles/
(Let's assume this takes 24 minutes)
3. Go to sleep for 24h.
4. At 15.24 on the next day, it'll sync the folder Desktop/A/23.11.2012/ with /Volumes/NAS/LastFiles/.
5…
6…

This means that on your NAS/LastFiles folder you'll just have the files in your most recent folder in Desktop/A/. I think this is what you wanted, right?

__________________Grey computer which does complicated stuff.
Cell phone that can talk to me. (Seriously)."Fancy quote from dead guy"