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

itsallinurhead

macrumors 6502
Original poster
Apr 23, 2007
495
0
Southern California
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!
 
This might point you in the right direction.

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
 
<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.
 
Kludge420, take a look at the OP's last sentence and then you'll see why I replied like I did.
 
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>"

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.
 
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.
 
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.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.