Strange Finder error
Strange Finder error
- Subject: Strange Finder error
- From: "Stockly, Ed" <email@hidden>
- Date: Fri, 14 Aug 2009 11:21:33 -0700
- Thread-topic: Strange Finder error
This is very strange. I'm on Tiger (I know!)
I have a script that I've been using for over a year on a daily basis.
It collects a number of files and folders from various sources (FTP sites,
network volumes) places them in a folder on the desktop.
This week it started crashing with an odd error message:
Finder got an error: The operation could not be completed because there is
already an item with that name. -48
This is the line that tripped the error (from inside a finder tell):
duplicate folder dailyDocsFolder to localDesktop with replacing
Here's where it gets weird.
-- The error message appears after the entire folder has finished copying.
-- There are no folders on the disk with the same name (I did a spotlight
and trashed all folders with that name anywhere on the mac, emptied the
trash and the problem persists)
-- Even if there were a folder on the disc with that name, the "with
replacing" should handle it
-- And here's the work around
tell application "Finder"
set folderName to name of alias dailyDocsFolder
if exists item folderName of localDesktop then
delete item folderName of localDesktop -- this line never executes
end if
try
duplicate folder dailyDocsFolder to localDesktop with replacing --
this line errors
set workingDailyFolder to the result as alias
on error ErrText number errNum
display dialog ErrText & return & errNum
if exists item folderName of localDesktop then
set workingDailyFolder to the item folderName of localDesktop as
alias
end if
end try
end tell
Any ideas?
ES
_______________________________________________
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/archives/applescript-users
This email sent to email@hidden