Can anybody get this to work?


  1. Posts : 72
    Windows 7 build 7600 64 bit
       #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
      My Computer


  2. Posts : 72
    Windows 7 build 7600 64 bit
    Thread Starter
       #2

    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"
      My Computer


  3. Posts : 72
    Windows 7 build 7600 64 bit
    Thread Starter
       #3

    Bump
      My Computer


  4. Posts : 7,538
    Windows 10 64bit/Windows 10 64bit/Windows 10 64bit
       #4

    It is against forum rules to bump threads you have to give people time to see your post.
      My Computer


  5. Posts : 2,913
    Windows 7 Ultimate x64 SP1
       #5

    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.
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 20:08.
Find Us