New
#1
Can anybody get this to work?
can anybody get this to work ? :\
Code:@echo off :start ping google.com /t >> "%userprofile%\Documents\Ping statistics\%date:~5,10%\%time:~1,7%.txt" goto start
can anybody get this to work ? :\
Code:@echo off :start ping google.com /t >> "%userprofile%\Documents\Ping statistics\%date:~5,10%\%time:~1,7%.txt" goto start
Bump, its only supposed to ping google and write the result to
"%userprofile%\Documents\Ping statistics\%date:~5,10%\%time:~1,7%.txt"
wich will turn into
"C:\Users\Schnitzel\Documents\Ping statistics\02.11.2009\0:25:59.txt"
If you plan on using dates for batch files, I would seriously look into VBS instead. You can do a lot more with a lot less hassle. For instance, I wanted to write a batch file that would copy a database back-end file to a backup location, with the date added to the file name. It never worked correctly - I wasted a few hours on it, until I came to my senses and did what I wanted in VBS in about 10 minutes.