Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Click here to return to the 'Change Finder file type to delete busy files' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Change Finder file type to delete busy files
Authored by: rjones@thestar on Jun 04, '04 12:58:43PM

Can I use AppleScript's ability to issue Unix commands to see if the file is busy or not? I'm trying to use AppleScript to print PostScript files from Quark 6 to the desktop and then move them to a specific location after that, but the Finder's copying the file to the network before Quark is done writing it! How can I get around that?

I've tried using AppleScript to get the file type and if contains "bzy" keep looping until it doesn't... and I've tried a repeat loop that checks the file size and doesn't continue until it stops growing, but these don't work.

I need some serious help here!

[ Reply to This | # ]
Change Finder file type to delete busy files
Authored by: gboudrea on Mar 25, '07 11:14:32AM
I'm using this to check if a file is currently being copied. This loop ends when the file has finished being copied.
repeat while (file type of file a_file) as string is "brok"
	delay 5
end repeat

- Guillaume

[ Reply to This | # ]