相关疑难解决方法(0)

在DOS批处理文件中注释多行

我写了很大的MS DOS批处理文件.要测试这个批处理文件,我只需要执行一些行,并希望隐藏/注释掉剩余的行.

我有一些以::开头的现有注释行,因此我不能再使用::因为它会扰乱所有注释.

在这方面的任何帮助将不胜感激.杰伊,提前谢谢

comments dos batch-file

89
推荐指数
4
解决办法
9万
查看次数

为什么我不能在批处理或cmd中调用"IF"和"FOR"?

说实话,我不希望这里有一个令人满意的答案.这个命令不能被调用,就是这样(据我所知,只有那些不能用于调用的命令).以下是其输出的几个示例:

C:\Windows\system32>call @if a==a echo called 
',' is not recognized as an internal or external command,
operable program or batch file.

C:\Windows\system32>call (@if a==a echo called)
';' is not recognized as an internal or external command,
operable program or batch file.

C:\Windows\system32>call if a==a echo called
'if' is not recognized as an internal or external command,
operable program or batch file.

C:\Windows\system32>call for  %a in (1) do @echo called
'for' is not recognized as an internal or external command,
operable …
Run Code Online (Sandbox Code Playgroud)

batch-file

5
推荐指数
1
解决办法
889
查看次数

标签 统计

batch-file ×2

comments ×1

dos ×1