To try, save the following in a batch file (say setip.bat). Replace those in italics with your values
@echo off
awk95 "{split($0,ar,\":\"); ip = substr(ar[2], 1,index(ar[2],\"/\") - 2); printf(\"set ip=%%s\n\",ip);}" ip.txt >sip.bat
call sip
start http://login-id:password@members.dyndns.org/nic/update?hostname=yoursite.selfip.org^&myip=%ip%^&wildcard=NOCHG^&mx=NOCHG^&backmx=NOCHG
Note:
1. DynDns.com is one site among many that gives the facility to have a web address to your machine.
2. awk95.exe is the Windows equivalent of awk in Unix/Linux etc.
3. wget.exe is to open any http/ftp pages from command line.
4. those lines without space in between are supposed to be a single line. After copying this to notepad, make that change before you try.
5. awk95 and wget is available to download if you do google them.
Would love to see your feedback, should you find it useful..
(I didn't know that DOS batch file have escape character. I just learned and it is ^)
No comments:
Post a Comment