Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: file copy over newtork




On Jul 24, 2006, at 10:03 AM, Bob Cuilla wrote:

I have a powerbook that has a mounted server, called theServer. I want to copy of a file from the desktop of the mounted server to the laptop desktop.

I cant seem to get the correct syntax for this script.


this is my script


tell app "finder"

set theSource to "theServer:users:me:desktop:filename"

duplicate theSource to desktop

end tell


I am running this from the laptop. what am i missing?

You're asking the Finder to duplicate a string to your desktop. Can't happen.


OK, while the string contents look like a path, it's no different from a random set of characters as far as the Finder is concerned. In order to get the Finder to do what you want you need to coerce the string to a file:

   duplicate file theSource to desktop

assuming, of course, that the string represents the correct path to the file in question.

Andrew
:)


_______________________________________________ Do not post admin requests to the list. They will be ignored. Applescript-users mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/applescript-users/email@hidden

This email sent to email@hidden
References: 
 >file copy over newtork (From: Bob Cuilla <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.