Ok,
STORY:
I made a Folder Actoins Script that when some files are dropped in, if they are pictures, get some info, create a folder with the date and time (something like: 20040617143458), put the file in it, create a text file with the info and send the folder to a remote share and delete the local folder, When I test it manually, like dropping a bunch to file in the folder, the script work perfectly and process each file, one after the other in order.
The goal of this script was to proccess files automaticaly send from a PC software. The thing is that the software send more than a file a second and it’s seem that for each file, the script start and it’s like as if it’s skipping some file. I’ve gotta process the files in the order they come, but it isn’t woring like a ‘first in first out’ but more like a ‘last in first out’. And if after some time (90 minutes later) some folders are still there ( half processed??) and I delete those, I start getting error, and since I try to manage all error, I generaly put the name of the folder in the error message, witch give me a good idea when the folder was created, and a lot are more than 1 hour ago… strange.
And since I’m using the date and time for the folder’s name, sometime the folder already exist and I gotta wait.
QUESTIONS:
1- Is there a way to make the Folder Actions Script to check each 5 minutes or so for new items? or to forget the Folder Action and just Schedule the script to check the folder each 5 minutes?
2- Is there a way to remember a value, like the first time the script start, the value is 001 the second time it’s 002 the tird time its’ 003 and so on…?
3- Is there a way to get the millisecond of the currentDate?
For now, the PC software is configured to send the file to another folder and when done, a human drag all files from that folder and drop it in the Folder with the Folder Actions script attached and it’s working fine, but I need it to be automatic.
Any suggestion will be appreciated.
Thanks
Max.