Batch file help

S

shallowz

To let know you I know very little about batch files
But I know a batch file will help in this situation
This is what I want to do

I want to be able to add
192.10.11.48 www.website.com
To the end of the hosts file in system 32

I want to do this to a couple of computers and I can’t replace the hosts
file so I need to add “192.10.11.48 www.website.com†to the end of the page

What are the codes I need to add to a patch file to do this?
 
B

Big_Al

shallowz said this on 1/7/2009 1:45 PM:
To let know you I know very little about batch files
But I know a batch file will help in this situation
This is what I want to do

I want to be able to add
192.10.11.48 www.website.com
To the end of the hosts file in system 32

I want to do this to a couple of computers and I can’t replace the hosts
file so I need to add “192.10.11.48 www.website.com†to the end of the page

What are the codes I need to add to a patch file to do this?

echo "192.10.11.48 www.website.com" >> %windir%\system32\drivers\etc\hosts


Thats all on one line if wordwrap kicks in.
 
S

shallowz

that is the answer i was looking for and it worked
thank you very much for your help
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top