Results 1 to 2 of 2
  1. #1


    Member Since
    Apr 25, 2008
    Posts
    5
    Applescripts copy a file from current working directory to Application\folder1
    Hi All,

    I'm trying to copy a file "ConfigUDPrint.app" from "current working directory" to Applications/UNiFLOW

    So far I have the following script:
    //////////////////////////////////////////
    tell application "Finder"
    set myFolder to (quoted form of (POSIX path of (parent of (path to me) as string)))

    do shell script "mkdir -p '/Applications/UniFLOW'"
    do shell script "cd $(dirname $(realpath $0))"
    do shell script "cd $myFolder"
    do shell script "cp -R ConfigUDPrint.app '/Applications/UNiFLOW'"

    end tell

    //////////////////////////////////////



    Any help would be nice.

    Thanks,

  2. #2

    Mark FX's Avatar
    Member Since
    Aug 13, 2011
    Location
    West Sussex, UK
    Posts
    200
    When you say "current working directory", what do you mean ?

    do you mean the current selected folder in Finder, or the current directory in the command shell ?

    The reason I ask is that the AppleScript command "path to me", will return the path to the Applescript itself, or the path to the AppleScript application.

    Regards Mark

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Copy back a directory
    By ecarter202 in forum macOS - Operating System
    Replies: 1
    Last Post: 10-04-2012, 11:23 PM
  2. Stop other applications popping up in front of current application?
    By Head_Unit in forum macOS - Operating System
    Replies: 7
    Last Post: 12-19-2011, 11:20 PM
  3. Replies: 1
    Last Post: 12-02-2011, 09:39 AM
  4. Where is the OSX application install directory?
    By converted in forum macOS - Operating System
    Replies: 4
    Last Post: 09-02-2010, 08:21 PM
  5. working directory
    By ikebock in forum Apple Desktops
    Replies: 7
    Last Post: 06-28-2006, 12:28 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •