如何用批处理直接去执行一个文本文件中的命令,即把一个*.txt 文本文件当BAT执行。不修改系统设置,不重命名文件后缀。
使过 cmd < test.txt 不成。
test.txt
~~~~~~~~~~~~~
:: this is a test file
set test=abc
echo %test%
~~~~~~~~~~~~~~
使过 cmd < test.txt 不成。
test.txt
~~~~~~~~~~~~~
:: this is a test file
set test=abc
echo %test%
~~~~~~~~~~~~~~
