@Paul,
I have updated my HOSTS tool, now supports the command lines:
/add "fullpath" = merge a new hosts file with an existing one
/remove [/s] "section name" = remove all the sections that begin with the specified name
/removeall [/s] = clear the HOSTS file
/s = silence mode
Download:
http://www.aldostools.com/temp/updatehosts.zip
Notes:
- The new HOSTS file should include the comments at the begining and at the end of the file.
- The /remove will add the prefix "#BEGIN of " and "#END of" if the "section name" does not start with #. If the "section name" start with #, the prefix is not used and the "section name" is used instead.
Example:
#BEGIN of KL Supertrick 7/30/2003
127.0.0.1 server1
127.0.0.1 server2
#END of KL Supertrick
#BEGIN of KL Supertrick 8/31/2003
127.0.0.1 server3
127.0.0.1 server4
#END of KL Supertrick
#KL Sites
127.0.0.1 server5
127.0.0.1 server6
#
#KL
127.0.0.1 server7
127.0.0.1 server8
#
/remove "KL Supertick" removes the blocks with servers 1,2,3,4.
/remove "KL Supertick 8/31/2003" removes the blocks with servers 3,4.
/remove "#KL" removes the blocks with servers 5,6,7,8
/remove "#KL Sites" removes the blocks with server 5,6
___
Aldo Vargas
http://www.aldostools.com