Re: Quick Folder Action question...
Re: Quick Folder Action question...
- Subject: Re: Quick Folder Action question...
- From: Rob Jorgensen <email@hidden>
- Date: Fri, 28 Nov 2003 12:45:19 -0500
At 11:00 AM -0600 11/28/03, John Head wrote:
Do you you have to check to see if the file is still being copied with a
folder action that looks for changes in folder?
Or does it handle it automatically?
No, it doesn't handle it automatically. I generally use a repeat loop
to check the file size and then let the script proceed when the size
stops changing. Something along these lines:
repeat -- until file size stops changing
set size_check1 to size of (info for file_)
do shell script "sleep 10" -- seconds (OS X)
-- delay 10 -- (pre-OS X)
set size_check2 to size of (info for file_)
if size_check1 is equal to size_check2 then exit repeat
end repeat
I can get file type and check to see if "bzy" if needed..
I've never had success in obtaining a useful result when checking the
busy status of a file in OS X.
-- Rob
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.