Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Monaj

macrumors regular
Original poster
May 24, 2009
193
0
Hi all,

I tried this script to copy release folder of one of my Xcode projects to desktop:

Code:
tell application "Finder"
    set targetFolder to folder "release" of folder "build" of folder "8_15pm" of folder "26th_March" of folder "XYZ" of startup disk
    set destinationFolder to folder "Desktop" of folder "Monaj" of folder "Users" of startup disk
    copy targetFolder to destinationFolder
end tell

I was expecting that I will obtain a folder named as release on my desktop but I did not get any :(

Can anyone suggest me where I am wrong or some better way to do this??

Thanks,

Monaj
 
Suggested strategies:

1. Read the Scripting Dictionary

Open the scripting dictionary of Finder (choose Open Dictionary from File menu in Applescript Editor.app). Read the description of its copy command (under Finder Basics).

Next, consider what Finder menu-item can be used to duplicate a selected item. Look for a Finder scripting command with that name.

2. Google It

Google keywords: finder copy file with applescript
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.