Re: Moving files...
Re: Moving files...
- Subject: Re: Moving files...
- From: kai <email@hidden>
- Date: Thu, 19 Apr 2007 01:07:28 +0100
On 18 Apr 2007, at 16:42, Steve Suranie wrote:
I’m trying to move a file from the users document folder to a
folder on a server. I’ve checked to see if the file exists and it
comes back true but when I try to move the file using the Finder I
get an error message saying it can’t get the file.
tell application "Finder"
move file thisJPEGFilePath as alias to folder issueJPEGFolder
end tell
where thisJPEGFilePath = "Macintosh
HD:Users:steve:Documents:ArchiveManagerDeluxe:tempJPEGFolder:HX-071600
7.jpg
I’ve checked all the folders in the path and all have read/write
permission. In fact, the files I am trying to move were initially
moved from a third server to the hard drive so I know I can move
them in, just can’t seem to move them out.
With that coercion to alias in there, Steve, I'd have expected the
error resulting from a suspect file path to be more along the lines
of a coercion failure (error number -1700) - the message for which
might be something like: Can't make file
"Disk:Users:username:folder:file.jpg" of application "Finder" into
type alias.
Without the coercion, a bad file path would be more likely to result
in an error number -1728 [errAENoSuchObject] - which, from your
description, could be what you're getting. (In such a case, the
message would be more like: Finder got an error: Can't get file
"Disk:Users:username:folder:file.jpg".)
However (and here's where it gets interesting), it's still possible
to encounter the above error, even with a valid file path - if
there's a problem accessing the target folder. Without the coercion,
the message would be exactly the same as above (identifying the file
as the offending object). With the coercion, the alias might be
reported as the culprit (in spite of the fact that an alias reference
already suggests a valid path).
Whether this has anything to do with the issue in hand, I couldn't
say. But it's probably worth rechecking access to the target folder,
too.
---
kai
_______________________________________________
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