如何使用命令在批处理文件中打开新的CMD?

时间:2013-05-15 18:05:35

标签: matrix batch-file cmd

如何让批处理文件打开另一个CMD窗口呢?

Title Matrix
color a
mode 1000
:start
Echo %Random% %Random% %Random% %Random% %Random% %Random% %Random% %Random% %Random% %Random% %Random% %Random% %Random% %Random% %Random% %Random% %Random% %Random% %Random% %Random% %Random% %Random% %Random% %Random% %Random% %Random% %Random% %Random% %Random% %Random% %Random% %Random% %Random% %Random% %Random% %Random% %Random% %Random% %Random% %Random% %Random% %Random% %Random% %Random% %Random% %Random% %Random%
Goto start

3 个答案:

答案 0 :(得分:3)

  1. 打开记事本

  2. 粘贴您的上述代码

  3. 将文件另存为filename.bat或filename.cmd

  4. 双击它以执行

答案 1 :(得分:1)

使用start命令:

start myFile.bat

另外,请检查Run a batch file in a new window from batch

答案 2 :(得分:1)

这是你想要的。这很简单。学习一些命令,但这是你的代码:

echo.@echo off>matrix.bat
echo.Title Matrix>>matrix.bat
echo.color a>>matrix.bat
echo.mode 1000>>matrix.bat
echo.:start>>matrix.bat
echo."echo. %Random% %Random% %Random% %Random% %Random% %Random% %Random% %Random%    %Random% %Random% %Random% %Random% %Random% %Random% %Random% %Random% %Random% %Random% %Random% %Random% %Random% %Random% %Random% %Random% %Random% %Random% %Random% %Random% %Random% %Random% %Random% %Random% %Random% %Random% %Random% %Random% %Random% %Random% %Random% %Random% %Random% %Random% %Random% %Random% %Random% %Random% %Random%">>matrix.bat
echo.goto start>>matrix.bat
start matrix.bat
goto :eof