unable to copy release folder of Xcode project to desktop using AppleScript

Discussion in 'Mac Programming' started by Monaj, Mar 31, 2010.

  1. Monaj macrumors regular

    Joined:
    May 24, 2009
    #1
    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
     
  2. chown33 macrumors 604

    Joined:
    Aug 9, 2009
    #2
    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
     

Share This Page