Re: Folder actions on mounted folders
Re: Folder actions on mounted folders
- Subject: Re: Folder actions on mounted folders
- From: What does not kill you only makes you stronger <email@hidden>
- Date: Mon, 27 Nov 2000 21:23:31 -0600
on 11/27/00 8:25 PM, email@hidden wrote:
>
* It was helpful to me to use an "In" folder, a "Temp Items" folder, and an
>
"Out" folder. Files are dropped into the "In" folder, detected by my
>
application, moved to the "Temp Items" folder, processed there, and then
>
moved to the "Out" folder when processing is complete.
If you do decide to use a temp folder, you might want to look at checking
that folder for input files also, otherwise if the script bails in the
middle, you have a file lost in la-la land. (Ever happen to notice the
existence of more than a few temp folder apps/scripts to delete those "lost"
files?)
I thought about that approach to several of the scripts I have running, and
decided against a temp folder, unless the file is really an in-between file,
and is expendable.
My reasoning for this is (after having several scripts that have been
running 24/7 for a few years now):
Servers get restarted, the mac os is sometimes prone to crashes, and
corruption (whether I like to admit it or not.) Power failures happen, and
sometimes end users like to do unexpected things that the programmer had
just never thought of, or intended to happen in the first place.
Basically my reasoning is this:
It is either in the In folder, or it has been processed. I have even
bypassed error folders, as it seems that is the last place a user will
look.. To me the container of the In folder is the error folder, nice and in
the open.
Then, take that text log that will soon be full of information, turn on web
sharing, and write a nice applescript cgi to read out the last few lines,
and send back in html. That way the end users can see what is happening, and
read errors, instead of scratching their heads a few times, then giving you
a call at 3 am...
These are just my thoughts on the matter, so take them for what they are
worth. I am in no way saying another approach is wrong, or bad, but rather
offering another view on the matter.
<Bring on OS X, this is going to be really fun.>
Nate
P.S: One more thing... Never save or write into the original input files.
make a copy, processs it, and delete the inpt files last. Worst case
scenario, you process a file twice, instead of trashing the input file...