I'm having a hard time figuring out why TCC is not accepting a FOR command that CMD is accepting and working as expected.
I am trying to use WMIC to get the version of a file. The following works when run with CMD.
When this is run with TCC I get this:
I am not understanding what the issue is and would appreciate any help.
I am trying to use WMIC to get the version of a file. The following works when run with CMD.
Code:
FOR /F "tokens=2 delims==" %%I IN ('wmic datafile where "name='C:\\Program Files\\Notepad++\\notepad++.exe'" get version /format:list') DO SET "RESULT=%%I"
ECHO %RESULT%
When this is run with TCC I get this:
Code:
test.cmd [10] Usage : FOR [/A:[[-][+]rhsdaecjot] /D /F ["options"] /H /I"text" /L /Nj /O:[-]adegnrstu /R [path] /T"..." /W] %var IN ([@]set | start, step, end) [DO] command ...
I am not understanding what the issue is and would appreciate any help.