Copy 1 file to list of srvs, rename existing

November 11, 2010 at 10:30:36
Specs: Windows
I need to keep hosts files up to date in a simple way. I want to read a list of servers from a text file int a script, rename the existing file on the server to hosts.old, if hosts.old exists then rename it to host. with the time stamp appended. then copy the new hosts file from a central location.

Then if something messes up I would like to be able to undo what was just done.

Maybe something like "hostscript.cmd new" and then "hostscript.cmd undo".

Then write out a log file to list servers updated and time and list any servers that did not get updated, like if one was shut down at the time.

Then make a nice cafe mocha and clean my house when it is done.


See More: Copy 1 file to list of srvs, rename existing

Report •

November 15, 2010 at 10:18:30


Report •
Related Solutions

Ask Question