October 25th, 2010, 11:27 AM
Help finishing script
Hi all. I wrote this command:
C:\> for /f %s in (computers.txt) do @robocopy \\server01\files\copyme \\%s\c$\localdir /S
To copy a directory from a server to multiple computers in a text file. What I want to do is make it a script that first checks the local machine for the folder, copies it to a new name, then overwrites the existing one. If anyone can help with this it would be awesome
October 25th, 2010, 01:05 PM
So this is what I have so far, but I dont think it is working.
Am I heading the right direction here?
for /F %s in (computers.txt) do
if exists \\%s\c$\program files\medrite-xl\Templates(
ren \\%s\c$\program files\medrite-xl\Templates \\%s\c$\program files\medrite-xl\Templates.OLD;
@robocopy \\serverName\share\medrite-xl\templates \\%s\c$\program files\medrite-xl\Templates
November 6th, 2010, 07:25 PM
why do you think its not working?
what happens when you run it?
if rename works what happens if you just rename...
what happens if you rename a file that is not present...
if its not fatal is it faster...
I always just do if it has no detrimental effect...
questions or the wrong question always slows the process up!