• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Moving files from desktop to User folders
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Moving files from desktop to User folders


  • Subject: Re: Moving files from desktop to User folders
  • From: Mr Tea <email@hidden>
  • Date: Sun, 05 Jan 2003 17:21:16 +0000

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])?
>
> Regards,
>
> Phil.

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

Note the colon after 'Documents'. Folder names at the end of a path are
always followed by a colon (or slash in a POSIX path).


HTH


Mr Tea
_______________________________________________
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.

  • Follow-Ups:
    • Re: Moving files from desktop to User folders
      • From: phildobbin <email@hidden>
    • Re: Moving files from desktop to User folders
      • From: Paul Berkowitz <email@hidden>
References: 
 >Re: Moving files from desktop to User folders (From: phildobbin <email@hidden>)

  • Prev by Date: Re: AppleScript Wizards
  • Next by Date: Re: Moving files from desktop to User folders
  • Previous by thread: Re: Moving files from desktop to User folders
  • Next by thread: Re: Moving files from desktop to User folders
  • Index(es):
    • Date
    • Thread