2
echo ping localhost -n 4 > nul >>TEST.bat
例如,當我打印在.bat文件中時,「> nul」消失。我怎樣才能打印「> nul」作爲一個字符串的方式?我應該如何在.bat文件中打印?
echo ping localhost -n 4 > nul >>TEST.bat
例如,當我打印在.bat文件中時,「> nul」消失。我怎樣才能打印「> nul」作爲一個字符串的方式?我應該如何在.bat文件中打印?
要esacpe >
或<
或|
只需添加CARRET使用``^ ^
@echo off
Color 0E
(
echo cls
echo @echo off
echo Color 0B
echo echo Please Wait a while ....
echo ping localhost -n 4 ^> nul
)>TEST.bat
cls
echo.
echo Type any key to read the contents of your new batch file
pause>nul
echo.
Type TEST.bat
pause>nul
cls
echo.
echo Type any key to execute your new batch file ...
pause>nul
TEST.bat
逃避它。 'echo ping localhost -n 4 ^> nul >> TEST.bat' –