由于.bat文件是基于16平台下的程序,在Windows NT及以后的32位中运行时偶尔会出现堆栈溢出之类的错误,所以建议在新的系统中尽可能的采用.cmd扩展的批处理文件代替.bat的文件。
Differences
The only known difference between .cmd and .bat file processing is that in a .cmd file the ERRORLEVEL variable changes even on a successful command that is affected by Command Extensions (when Command Extensions are enabled), whereas in .bat files the ERRORLEVEL variable changes only upon errors.
The differences between .CMD and .BAT as far as CMD.EXE is concerned are:
With extensions enabled, PATH/APPEND/PROMPT/SET/ASSOC in .CMD
files will set ERRORLEVEL regardless of error. .BAT sets ERRORLEVEL
only on errors.
欢迎光临 批处理之家 (http://bbs.bathome.net/) | Powered by Discuz! 7.2 |