Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
Dos Bat. to edit file (hosts)
Name: mikesoong Date: July 27, 2006 at 03:57:09 Pacific OS: XP CPU/Ram: 256 Product: hp
Comment:
How do I write a dos bat file to edit my hosts windows file. Currently I have written a login script that every time a user login it will append "172.29.1.43" to hosts file by using the following command echo 172.29.1.43 >>hosts. But the problem append will keep on writting new 172.29.1.43 to the end of other line. My intention here is every time a user login ... it will append 172.29.1.43 to hosts file but if the 172.29.1.43 exists then it will only overwrite the IP.
Summary: PROBLEM 1. UNKNOWN SOME EMPLOYEE IS CHANGING THE COMPUTER SYSTEM CLOCK TO MANIPULATE THE TIME STAMPS THEN RUNNING ATOMIC CLOCK TO RESET IT 2. I NEED TO CREATE INSTANT RETIREMENT PROGRAM FOR THE EMPL...
Summary: Here's a faster version that doesn't need dummy data to be added to the file. It relies on the XCOPY /D feature which only copies the source file if it is newer than the destination file. Since we don...
Summary: Well, first of all we need more details to help you out. If you want to just edit them in dos, then type edit filename.bat or edit filename.txt. If you want to create a program and create and edit fil...