Re: Empty Trash error?
Re: Empty Trash error?
- Subject: Re: Empty Trash error?
- From: Joe Szedula <email@hidden>
- Date: Wed, 25 Jul 2001 08:34:03 -0500
John McMillan wrote:
>
I have made up a script which backs up my work folder to an external HD each
>
night.
>
The script looks to see if there is more than two backup folders and if so
>
moves one to the trash where it checks for locked files and then deletes the
>
trash to continue with backup.
>
Recently I have been getting an error at this point and this is the message
>
in the event log:-
>
>
delete folder "Tuesday backup 03-07-2001 #01" of folder "Tuesday" of disk
>
"BackUp HD"
>
--> folder "Tuesday backup 03-07-2001 #01" of trash
>
set locked of every file of entire contents of trash to false
>
--> Finder got an error: because *0x/it/* contains items that are in
>
use
>
>
what is Ox/it/
>
The trash is empty before the script is run and there are no other progs
>
running.
>
Anyone know what the problem could be?
Try running this script to see what else is running. It might give you an
idea what else is running and what file might be use.
on run
-- open file to receive process list
set OutputFolderName to (choose folder with prompt "write process list
into which folder ?") as text
set OutputFileName to OutputFolderName & "Process list - results"
tell application "Finder"
if file OutputFileName exists then delete file OutputFileName
end tell
set myFileRef to (open for access file OutputFileName with write
permission)
write "Process List (in the order of launch)" & return to myFileRef
-- get list of processes
tell application "Finder"
set pList to (get the name of every application process)
repeat with i from 1 to (count of pList)
set theApp to item i of pList
set t to file type of process theApp
set m to partition space used of process theApp
set a to total partition size of process theApp
set v to visible of process theApp
if v then
set v to "yes"
else
set v to "no"
end if
if (t = "APPL") then set t to "application"
set outList to (i & ": " & theApp & ", type=" & t & ", RAM used=" & m
& ", RAM avail=" & a & ", visible=" & v as text)
write outList & return to myFileRef
end repeat
end tell
-- close file
close access myFileRef
end run
Joe Szedula
Email: email@hidden