【发布时间】:2022-01-10 16:31:12
【问题描述】:
FOR /F "tokens=3 delims= " %i IN (query session | FINDSTR /i "console") DO set "ID=%i"
我收到一个错误| was unexpected at this time.
【问题讨论】:
-
N. B.: 在批处理文件中,您需要将
%-符号加倍(在命令提示符中键入for /?)...
标签: windows for-loop batch-file cmd pipe