Simple Duplicate/Overwrite AppleScript

Discussion in 'Mac Programming' started by itsallinurhead, Oct 12, 2007.

  1. itsallinurhead macrumors 6502

    itsallinurhead

    Joined:
    Apr 23, 2007
    Location:
    Southern California
    #1
    I am trying to create an Apple Script so that the com.apple.dock.plist file is overwritten by one of my choice every-time a user logs in. This way I can keep the docks looking the same computer to computer.

    This is what I am trying, but nothing is happening
    tell application "Finder"

    duplicate file "source file here?" to folder "What would I put here so the current users com.apple.dock.plist is overwritten by the one of my choice"
    replacing
    true


    end tell

    Basically I need my com.apple.dock.plist to be overwritten to users/currentuser/library/preferences -so first I need the current user to be found


    Thanks!
     
  2. kainjow Moderator emeritus

    kainjow

    Joined:
    Jun 15, 2000
  3. Kludge420 macrumors regular

    Joined:
    Apr 20, 2009
    #3
    That "answer" has nothing to do with the question. Please do not post non-answers and don't post links without posting the actual answer as web pages change all the time. If you had taken two seconds to click on your own link you would have seen it was useless.

    I can't tell you how many times I've found 100 answers to my questions but they were all links from some jerk that said, "Use search next time, your answer is here <useless and/or dead link>"

    Here's your actual answer:

    Code:
    tell application "Finder"
    	duplicate file "Hard Drive Name:Source:Path:Separated:By Colons:FileName" to folder "Hard Drive Name:Destination:Path:Separated:By Colons:" with replacing
    end tell
    
     
  4. lee1210 macrumors 68040

    lee1210

    Joined:
    Jan 10, 2005
    Location:
    Dallas, TX
    #4
    <redacted>

    I didn't realize this thread was nearly three years old. Not worth dignifying it's resurrection with more talking. Suffice it to say, i disagree with Kludge420.
     
  5. kainjow Moderator emeritus

    kainjow

    Joined:
    Jun 15, 2000
    #5
    Kludge420, take a look at the OP's last sentence and then you'll see why I replied like I did.
     
  6. GGJstudios macrumors Westmere

    GGJstudios

    Joined:
    May 16, 2008
    #6
    A few tips to improve your experience in this forum:
    1. Pay attention to the age of the threads you respond to.
    2. Read the entire thread so you understand the context in which people respond.
    3. Spend more time offering help and less time attacking other posters.
    4. Before ranting against a poster, at least make sure it's not a forum moderator.
     
  7. MacSlut macrumors 6502

    Joined:
    Aug 12, 2002
    Location:
    Bar
    #7
    And 3 more years later...

    Wow, here it is 3 more years later. I happen to search for how to do this and this thread comes up as one of the top search results. Another result did a dead-link answer just as Kludge420 cautioned about.

    Thanks to Kludge420, I got the answer right here, despite the top "answer" being a broken link with no info.

    Sorry guys, but Kludge420 was right, or at least he *did* help me because of what he was suggesting people do.

    Thanks Kludge420... keep on keeping on.
     
  8. ArtOfWarfare macrumors 604

    ArtOfWarfare

    Joined:
    Nov 26, 2007
    #8
    Old threads often get resurrected by Google (and other) searches. It's always good to answer the question that people will have when they arrive here, even if the question isn't exactly the same as the OP had years prior. I've found this to be the case on StackOverflow, MacRumors, and other programming forums.
     

Share This Page