Code: Select all
AC01012011 value="log1.txt"
This continues with different dates and different log files for several thousands of lines.
I'd like to set a FOR loop that views the text file, but deletes everything before value.
Code: Select all
FOR /F "tokens=* delims=" %%i in (C:\test\master_logs.txt) DO (
set line=%%i
set sort=%line:*value%
echo %sort% >> sorted_logs.txt
)
The above loop is what I currently have, but only outputs ECHO is off in the sorted_logs.txt file
I believe my issue is with the first set, in that it is trying to set a parameter value as a variable, and for some reason it doesn't like that.
Does anyone know how this can be easily accomplished?