ipconfig /all >> textfile.txt
Sorry, just noticed you want to add a timestamp as well. For that you must create a batch file with the following contents:
Code:
@echo %date% %time%
@ipconfig /all
Save it somewhere (make sure the filename has a .bat extension), and then create a scheduled task for the following:
Code:
cmd /c "C:\Directory where\you put\the batch file.bat" >> "C:\IP log".txt
The double >-sign ensures text gets appended and not overwritten. Obviously, the paths must be replaced with your equivalents. If you want to log just your IP address without the extra info, add " | find "IPv4 Address" without the quotes and with the trailing space to the second line. We could fiddle with the first one as well...
Code:
@echo Today's %date%. The time is %time%. My IP address at the moment is as follows.
@ipconfig /all | find "IPv4 Address"
And that would give this more elegant output:
Today's 14/06/2011. The time is 19:05:20,16. My IP address at the moment is as follows.
IPv4 Address. . . . . . . . . . . : 23.45.67.89(Preferred)
Bookmarks