Print Date in txt Output Solved

  1.    #1

    Print Date in txt Output

    I have a batch file that outputs a text file for results of ipconfig. How can I add a date to the top of the printed page?

    ipconfig /all > c:\users\[username]\ip_config.txt
      My ComputerSystem Spec

  2. slicendice's Avatar
    Posts : 4,065
    Windows 10 Pro x64 v1809 Build 17763.379 (Branch: RS5 Release Preview)

    Use this:
    DATE /T
    If you need time also use this:
    TIME /T

    Or use this:


    Click image for larger version. 

Name:	date_time.png 
Views:	1 
Size:	8.5 KB 
ID:	185211

    Your full code could look like something like this:
    ECHO %DATE% %TIME% > %USERPROFILE%\ip_config.txt
    IPCONFIG /ALL >> %USERPROFILE%\ip_config.txt
    Last edited by slicendice; 18 Apr 2018 at 14:05.
      My ComputersSystem Spec


Related Threads
The field shows as text 10/11/1985. How can I convert it to number?
I've got a really funky setup. Basically XBOX One (HDMI to HDMI)/ Computer (HDMI to HDMI) to Receiver (supports 4K passthrough) to Monitor (via HDMI) I also have my computer plugged directly into my monitor via DisplayPort. I want to be able...
Greetings, and thanks in advance for your help.. Awhile back I formatted my Windows 10 PCs to show ddd dd-mmm-yyyy on my taskbar clock. This worked happily on my desktop and laptop for months, maybe even a year + Now (probably starting in the...
OK, this one is a twist on a very often reported problem on these forums: Internet Explorer 11 will not print and just shows an empty print preview page. (Edge works/prints fine). However in this case I know what caused the issue but not how...
The print spooler chokes on both of my Windows 10 machines when trying to deal with certain pdf files. For instance when I tried to print via my browser (Chrome), it printed the first 6...

Tags for this Thread

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

Designer Media Ltd
All times are GMT -5. The time now is 12:39.
Find Us