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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
below should work but i would still test it on a single machine to make sure
rename %winddir%Appdata/Roaming/F oldername/ file.exist ing %winddir%Appdata/Roaming/F oldername/ file.old
xcopy /C \\server\share\file.new %winddir%Appdata/Roaming/F oldername/ file.new
rename %winddir%Appdata/Roaming/F
xcopy /C \\server\share\file.new %winddir%Appdata/Roaming/F
ASKER
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.
ASKER