Re regarding:
Regarding the error capture in pure DOS, I mentioned it on the 12th route. Here I restate two points:
1. DOS has no handles, so it does not support the usage of 1>nul and 2>nul;
2. Almost none of the internal commands in DOS support ERRORLEVEL, so its error status cannot be judged by errorlevel, but other methods must be sought for judgment, such as using alternative external commands (xcopy instead of copy), such as using if exist to judge the existence of the file before and after copy.
Regarding the error capture in pure DOS, I mentioned it on the 12th route. Here I restate two points:
1. DOS has no handles, so it does not support the usage of 1>nul and 2>nul;
2. Almost none of the internal commands in DOS support ERRORLEVEL, so its error status cannot be judged by errorlevel, but other methods must be sought for judgment, such as using alternative external commands (xcopy instead of copy), such as using if exist to judge the existence of the file before and after copy.
※ Batchinger 致 Bat Fans:请访问 批处理编程的异类 ,欢迎交流与共享批处理编程心得!
