批处理查找字符串并使用'#'进行注释

时间:2016-08-10 08:50:30

标签: batch-processing

我正在编写一个批处理过程,我需要在其中找到一行并在该行的前面添加“#”。

for /f "tokens=1,* delims == " %%x in (xyz.properties) do (
if "%%x"=="Tools" set %%x
if "%%x"=="user_name" set %%x
)

文件中出现user_name和tools。该行应注释为# 在此先感谢!!!

0 个答案:

没有答案