"WINWORD.EXE","2348","Console","1","49,852 K"
"WINWORD.EXE","4568","Console","1","48,840 K"
INFO: No tasks are running which match the specified criteria.
INFO: No tasks are running which match the specified criteria.
INFO: No tasks are running which match the specified criteria.
INFO: No tasks are running which match the specified criteria.
"WINWORD.EXE","1980","Console","1","36,928 K"
INFO: No tasks are running which match the specified criteria.
INFO: No tasks are running which match the specified criteria.
INFO: No tasks are running which match the specified criteria.
INFO: No tasks are running which match the specified criteria.
INFO: No tasks are running which match the specified criteria.
INFO: No tasks are running which match the specified criteria.
INFO: No tasks are running which match the specified criteria.
INFO: No tasks are running which match the specified criteria.
INFO: No tasks are running which match the specified criteria.
INFO: No tasks are running which match the specified criteria.
INFO: No tasks are running which match the specified criteria.
INFO: No tasks are running which match the specified criteria.
INFO: No tasks are running which match the specified criteria.
INFO: No tasks are running which match the specified criteria.
INFO: No tasks are running which match the specified criteria.
Code: Select all
FOR /F %%C IN (C:\b.log) DO (
SETLOCAL ENABLEDELAYEDEXPANSION
SET "old=%%C"
SET new=!old:INFO: No tasks are running which match the specified criteria.=!
:: output: INFO:
ECHO !new! >> C:\c.log
)
ENDLOCAL
PAUSE
I want to replace "INFO: No tasks are running which match the specified criteria." with "" (nothing) in the b.log text file
but I don't know how to tell CMD the ":" in the string to be replaced should be treated not as special characters
I've used ^ but failed.
Code: Select all
SET new=!old:INFO^: No tasks are running which match the specified criteria.=!