Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Quick Folder Action question...



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.

References: 
 >Quick Folder Action question... (From: John Head <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.