Solved

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

Posted on 2014-09-15
4
330 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
If you’re thinking to yourself “That description sounds a lot like two people doing the work that one could accomplish,” you’re not alone.
Windows 8 comes with a dramatically different user interface known as Metro. Notably missing from the new interface is a Start button and Start Menu. Many users do not like it, much preferring the interface of earlier versions — Windows 7, Windows X…
With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…

772 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now