Link to home
Start Free TrialLog in
Avatar of Jamsheer Meethal
Jamsheer Meethal

asked on

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

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.
ASKER CERTIFIED SOLUTION
Avatar of Joseph Daly
Joseph Daly
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Jamsheer Meethal
Jamsheer Meethal

ASKER

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.
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
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.