• 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: 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.

References: 
 >Re: Moving files from desktop to User folders (From: Mr Tea <email@hidden>)

  • Prev by Date: Scripting OS X Address Book
  • 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