View Full Version : Simple Duplicate/Overwrite AppleScript
itsallinurhead
Oct 12, 2007, 03:14 AM
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!
kainjow
Oct 15, 2007, 10:48 PM
This (http://textsnippets.com/posts/show/519) might point you in the right direction.
Kludge420
Jun 29, 2010, 01:17 PM
This (http://textsnippets.com/posts/show/519) 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:
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
lee1210
Jun 29, 2010, 01:24 PM
<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.
kainjow
Jun 29, 2010, 08:17 PM
Kludge420, take a look at the OP's last sentence and then you'll see why I replied like I did.
GGJstudios
Jul 19, 2010, 07:53 AM
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:
Pay attention to the age of the threads you respond to.
Read the entire thread so you understand the context in which people respond.
Spend more time offering help and less time attacking other posters.
Before ranting against a poster, at least make sure it's not a forum moderator.
vBulletin® v3.8.6, Copyright ©2000-2012, Jelsoft Enterprises Ltd.