Solved

Hi all., I need a script to update a file on all the machines in our organization.

Posted on 2014-09-15
4
332 Views
Last Modified: 2014-09-15
We have a file which is stored on "%winddir%Appdata/Roaming/Foldername". I need to automate the process of updating this file to almost 300 machines. I hope if I have a script to do this job which then can be deployed via SCCM or GP. Can someone please help me with this.
0
Comment
Question by:Jamsheer Meethal
  • 2
  • 2
4 Comments
 
LVL 35

Accepted Solution

by:
Joseph Daly earned 500 total points
ID: 40323838
If its just a single file and the file is the same across all of the hosts why not just do a simple xcopy?

xcopy \\source \\target
0
 

Author Comment

by:Jamsheer Meethal
ID: 40323847
Hi Joseph, thanks for your prompt response., can I use xcopy to replace the existing file in the same location on the users machine., even a rename to *.old will also do the job. I am sorry, but I am very poor in scripting.  Thanks again.
0
 
LVL 35

Expert Comment

by:Joseph Daly
ID: 40323874
below should work but i would still test it on a single machine to make sure

rename %winddir%Appdata/Roaming/Foldername/file.existing %winddir%Appdata/Roaming/Foldername/file.old
xcopy  /C \\server\share\file.new %winddir%Appdata/Roaming/Foldername/file.new
0
 

Author Closing Comment

by:Jamsheer Meethal
ID: 40323983
HI, can you please let me krnow if xcopy can be used to remove or rename the existing file on the users machine before copying the new file from my share.
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Citrix XenApp, Internet Explorer 11 set to Enterprise Mode and using central hosted sites.xml file.
Computer science students often experience many of the same frustrations when going through their engineering courses. This article presents seven tips I found useful when completing a bachelors and masters degree in computing which I believe may he…
In this video, we discuss why the need for additional vertical screen space has become more important in recent years, namely, due to the transition in the marketplace of 4x3 computer screens to 16x9 and 16x10 screens (so-called widescreen format). …
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

808 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question