Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: Output Date to File  (Read 4036 times)

0 Members and 1 Guest are viewing this topic.

silvrwood

    Topic Starter


    Rookie

    Output Date to File
    « on: October 17, 2008, 01:54:31 PM »
    I've tried to output the system date to a file, and it does output the date, but the cmd window never closes because it's waiting for input.  How do I output the date to a file either supplying an enter to the system, or bypassing the prompt in a .bat file?

    Sidewinder



      Guru

      Thanked: 139
    • Experience: Familiar
    • OS: Windows 10
    Re: Output Date to File
    « Reply #1 on: October 17, 2008, 02:56:30 PM »
    Code: [Select]
    date /t > datefile.txt

    That will eliminate the prompt.

     8)
    The true sign of intelligence is not knowledge but imagination.

    -- Albert Einstein

    Dias de verano

    • Guest
    Re: Output Date to File
    « Reply #2 on: October 17, 2008, 03:46:54 PM »
    alternative:

    Code: [Select]
    echo %date% > datefile.txt

    silvrwood

      Topic Starter


      Rookie

      Re: Output Date to File
      « Reply #3 on: October 20, 2008, 11:41:27 AM »
      Wonderful!  Thanks so much!
       ;D

      johnsonbben



        Greenhorn

        Re: Output Date to File
        « Reply #4 on: November 22, 2008, 07:57:40 PM »
        Code: [Select]
        echo %date% >filename.txt

        Dias de verano

        • Guest
        Re: Output Date to File
        « Reply #5 on: November 23, 2008, 02:13:35 AM »
        Why did you duplicate a post made on October 17th, johnsonben?