Is is possible for a batch file to create an xml with one

February 14, 2019 at 00:03:56
Specs: Windows 7
Is is possible for a batch file to create an xml with one field that will only show the current hour ?

So the XML will look like this for example ?

<track>
<timestamp>The current hour is 14</timestamp>
</track>

message edited by Trickster79


See More: Is is possible for a batch file to create an xml with one

Reply ↓  Report •

#1
March 13, 2019 at 11:35:29
yes, don't know how this wasn't answered before.

give me a few min

i5-6600K[delid]@4.8GHz/4.4GHz cache/@1.408v | 2x4GB Crucial-DDR4-2400CL17@14-15-15-28 1T 3000MHz@1.4v | Sapphire Nitro+ SE RX 590 8GB@1525Mhz core@1.0v/2260MHz@1500MHz timings BiosModded


Reply ↓  Report •

#2
March 13, 2019 at 11:40:40
running below test.bat will create a file on the user's desktop with the xml code (14 will be replace with the current hour)


@echo off
echo ^<track^>>%userprofile%\Desktop\time.xml
echo ^<timestamp^>The current hour is %time:~0,2%^</timestamp^>>>%userprofile%\Desktop\time.xml
echo ^</track^>>>%userprofile%\Desktop\time.xml

i5-6600K[delid]@4.8GHz/4.4GHz cache/@1.408v | 2x4GB Crucial-DDR4-2400CL17@14-15-15-28 1T 3000MHz@1.4v | Sapphire Nitro+ SE RX 590 8GB@1525Mhz core@1.0v/2260MHz@1500MHz timings BiosModded


Reply ↓  Report •
Related Solutions


Ask Question