Re: Moving files from desktop to User folders
Re: Moving files from desktop to User folders
- Subject: Re: Moving files from desktop to User folders
- From: phildobbin <email@hidden>
- Date: Sun, 05 Jan 2003 19:28:58 +0000
On 5/1/03 17:21, "Mr Tea" <email@hidden> wrote:
>
This from phildobbin - dated 05-01-03 03.04 pm:
>
>
> tell application
>
> "Finder.app"
>
> copy file "CGI script" of desktop to "Documents"
>
> end tell
>
>
>
> ScriptDebugger gives me a:
>
>
>
> `Can't set "Documents" to file "CGI script" of desktop. Access not allowed.'
>
>
>
> And an Applescript error -10003 when trying to compile.
>
>
>
> Any ideas (I'm logged in as an administrator and have permissions set
>
> correctly [0700])?
>
For copying items in the finder, you need 'duplicate', not copy.
>
>
Also, you need to be more specific about what "Documents" is, otherwise AS
>
just doesn't have a chance. That's like trying to send someone a letter and
>
only putting their name on the envelope.
>
>
Try this:
>
>
tell application "Finder"
>
set theDest to ((path to current user folder) as string) & "Documents:"
>
duplicate file "CGI script" of desktop to folder theDest
>
end tell
[...]
Thanks for that.
Replacing `duplicate' with `move' achieves exactly what I was after.
Regards,
Phil.
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.