Two questions about Folder Actions Script

Hi,
I’m trying to script a Folder Actions Script and I stepped on two things that, as I see it, do not work properly.

The first one is something like:

move folder theFolder to folder exportFolder

if “exportFolder” is a local folder, everything’s working great, but if it’s on a remote computer, the folder “theFolder” isn’t moved but copied. Ok, it’s not so hard to make it what I want (just have to delete the folder after copying it if it exist) but when doing it manually, it move the folder, not copying it. Is it a normal behavior?

In second place, much more irritating, is the

try
     do something...
on error errText number errNum
     display dialog errText & return & errNum	
     quit me
end try

The thing is that sometime, if something doesn’t work, I want to quit the script. Since I don’t want to let anything do something that it isn’t supposed to, I have a couple of those. But the things is, when the script quit, the Folder Actions are disable and I have to enable it almost each time there is an error.

I don’t know, maybe it’s me or the ‘quit me’ but something disable the Folder Actions each time I’ve got an error with my script.

Thanks for any hint.

Max.

That’s standard behaviour when “moving” an item to another disk. It should happen when you drag the item manually too.

The instruction ‘quit’ quits the process running the folder action - probably System Events here. Try using the ‘User canceled.’ [sic] error instead:

try
     do something...
on error errText number errNum
     display dialog errText & return & errNum 
     error number -128
end try

Thanks,
the “error number -128” helped a lot, but about the folder moving (even if it isn’t about the Folder Actions), I always use the ‘apple key’ (I don’t know if it’s called that, but the key just beside the spacebar) when I want to move something (drag & drop) so no ‘+’ is showing. And when doing so with a remote share, it move, not copy.

How can I have the same fonctionnality with Applescript when moving folder to a remote share?

Thanks.

Max.