Re: Delete contents of 'server' folder on shutdown...
Re: Delete contents of 'server' folder on shutdown...
- Subject: Re: Delete contents of 'server' folder on shutdown...
- From: Devon and Cornwall <email@hidden>
- Date: Fri, 1 Jun 2001 21:38:04 -0700
At 3:24 PM -0400 5/30/01, James Steincamp wrote:
>
I have written this script to delete the contents of the 'server' folder
>
within the system folder for our media/scanning station.
>
>
tell application "Finder"
>
activate
>
select every item of container window of folder "Servers" of folder
>
"System Folder" of startup disk
>
delete selection
>
empty trash
>
end tell
>
>
I have placed it inside the 'shutdown' items folder within the system folder
>
as a way of running it automatically. Basically the number of server alias
>
grows to several hundred over the course of a few weeks as our designs log
>
into the server to transfer their scans, etc. and I needed a way of cleaning
>
the folder out periodically.
>
>
It runs faithfully and does what it's supposed to, however it aborts the
>
shutdown/restart process. Is this standard behaviour?
Yes, it seems to be.
>
What do I do in the
>
script to ensure that the shutdown/restart process proceeds normally?
tell application "Finder"
delete every item of folder "Servers" of folder "System Folder" of startup disk
empty
end tell
tell application "Finder" to shutdown
I didn't see if you received an answer, but I hope this helps.
Devon