Re: rm does not always remove immediately
Re: rm does not always remove immediately
- Subject: Re: rm does not always remove immediately
- From: Emmanuel <email@hidden>
- Date: Tue, 12 Dec 2006 16:52:09 +0100
At 7:52 AM -0600 12/12/06, Luther Fuller wrote:
tell application "Finder"
if not (exists folder testFolderName of desktop) then
make new folder at desktop with properties
{name:testFolderName}
set testFolder to the result as alias
else
set testFolder to (folder testFolderName of desktop) as alias
end if
--
make new folder at testFolder with properties {name:"x"}
set testItem to the result as alias
--
try
"rm -fr " & (quoted form of POSIX path of testItem)
do shell script the result
on error
display dialog "Error during rm"
return
end try
--
delay 3
if exists folder "x" of testFolder then
"It's still there!"
else
"It's gone!"
end if
display dialog the result
end tell
NOTICE: the difference in behavior between running the script with
the folder "rm-test folder" closed vs open.
I think that this does not mean that "rm" does not remove, only that
Finder is not aware.
If I replace the "delay 3 etc" part of your script by a simple "get
blah as alias" (with no delay) I get the file not found error all
right.
Emmanuel
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/mailman//archives/applescript-users
This email sent to email@hidden