I have log file that has log information, i need to pull data for specific date& time (24hours data) using Batch script.
Appreciate if anybody helps on this.
Log info. looks likes this:
Wed Jun 06 05:50:15 EDT 2012 INFO: Check Fail TS:20120607105024z uid:xatest
----
----
Thu Jun 07 05:50:15 EDT 2012 INFO: Check Fail TS:20120607105024z uid:vdtest
::check.bat
::references check.log, please adjust to name
::using the following formula Wed Jun 06 05:50:15 EDT 2012 INFO: Check Fail TS:20120607105024z uid:xatest
for /f "tokens=4,11" %%G in (c:\check.log) DO echo %%G %%H>>newlog.log
::and outputs date and uid to newlog.log
::not sure where you wanted to use the information, so i directed to a new log.
::feel free to give more options and parameters.:: mike
Yes (14) | ![]() | |
No (14) | ![]() | |
I don't know (15) | ![]() |