Check File Time and Date to Copy

Hey Guys,

I have a project I’m working on with two different machines that are connected by a wireless network. I want to be able to work on one computer, and if I make any changes to the project and save it, it will log onto the network and copy (or update) the project on the other computer automatically. I have the script down to connect to the network, and copy the designated file, but I have no way to trigger the script.

I was thinking that if I open the file through an applescript, I can have the script somehow continue to check the files time or date until I quit the application that I am running the file in. If either one changes, it will run the script I have already written to copy the file to the other computer.

Would it be better to link a script to the file itself by the time and date to trigger this action, or would I be better off putting the project file in it’s own folder, and attaching a folder action script that would look for any changes in the files within the folder?

I’m a bit of a newbie, but it seems like you could set up a Folder Action to run your script. Apple has a snippet to run a script when you close a window. You should be able to set up both folders to send copy to each other.

on closing folder window for this_folder
	-- insert actions here
end closing folder window for

Hope this helps,