Extract Values From Todays Date
Posted: 21 May 2017 20:26
Hey everyone,
My current .batch is extracting specific values from XML files which I need.
The problem is that I only need the values/data from todays date.
Therefore, it should only extract from the newest XML files. (from today)
The Code:
Is it possible to add a certain command to extract only todays files?
Thanks for any help in advance !
My current .batch is extracting specific values from XML files which I need.
The problem is that I only need the values/data from todays date.
Therefore, it should only extract from the newest XML files. (from today)
The Code:
Code: Select all
@echo off & setlocal enabledelayedexpansion
(for /F "tokens=1,2 delims=<>" %%a, in ('findstr "Name=\"Riven\" test=\"Plat32\"" *.xml') do (
set "list=%%b"
for /F "delims=" %%c in (^"!list: ^=^
% Do NOT remove this line %
!^") do set %%c
if "!Name!+!test!" equ ""Riven"+"Plat32"" (
for /F "tokens=1* delims=:" %%f in ("%%a") do (
echo %%f, !testTime!, %%~tf, !errorCount!
)
)
)) > Outputfile.txt
start notepad outputfile.txt
goto :eof
Is it possible to add a certain command to extract only todays files?
Thanks for any help in advance !