If you occasionally change the names and IP addresses of servers in your domain and some of your client machines use HOSTS files for DNS name resolution, you can use the script HostsFileCreator.bat to reflect those changes in the HOSTS files. Before I show you how to use this Windows NT shell script, let me explain how it works.
How HostsFileCreator.bat Works
HostsFileCreator.bat lets you either replace or modify existing HOSTS files. The script also lets you roll back to previous HOSTS files, if necessary. To run, HostsFileCreator.bat needs two input files and two batch tools.
The first input file that the script needs is servers.txt. This file lists the computers on which you need to change the HOSTS files. The second input file, hostsnew.txt or hostsappend.txt, provides the new information for the HOSTS files. If you want to replace the existing HOSTS files, the script needs hostsnew.txt. If you want to modify the existing HOSTS files, the script needs hostsappend.txt. . . .
klinux3r July 29, 2008 (Article Rating: