Solved

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

Posted on 2014-09-15
4
334 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

[Webinar] Code, Load, and Grow

Managing multiple websites, servers, applications, and security on a daily basis? Join us for a webinar on May 25th to learn how to simplify administration and management of virtual hosts for IT admins, create a secure environment, and deploy code more effectively and frequently.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Hide file extensions in Notepad++ tabs 2 79
Survey branching tutorial 11 74
Data Analysis 7 58
Extract data from output with RegEx 1 41
Ever notice how you can't use a new drive in Windows without having Windows assigning a Disk Signature?  Ever have a signature collision problem (especially with Virtual Machines?)  This article is intended to help you understand what's going on and…
In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.

739 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