To All:
The other day, I completed a batch processing code for processing a folder. There is a segment of code that intends to use the resource explorer to open the processed folder. After the user confirms that it is correct and closes the browser window of the folder, the subsequent processing operations are executed. The code is as follows:
But the result is that start /w "did not play its due role", that is, after opening the test folder, it did not wait for it to close, and then output Program is finished. and return errorlevel: 0, and other subsequent operations are also executed in turn until the folder is deleted, and the browser window is automatically closed.
Of course, here I don't advocate doubting whether there is any bug in start/w, but to think about whether there is any particularity of the explorer process of the resource explorer, which affects the performance of start/w.
[ Last edited by willsort on 2006-6-20 at 11:17 ]
The other day, I completed a batch processing code for processing a folder. There is a segment of code that intends to use the resource explorer to open the processed folder. After the user confirms that it is correct and closes the browser window of the folder, the subsequent processing operations are executed. The code is as follows:
But the result is that start /w "did not play its due role", that is, after opening the test folder, it did not wait for it to close, and then output Program is finished. and return errorlevel: 0, and other subsequent operations are also executed in turn until the folder is deleted, and the browser window is automatically closed.
Of course, here I don't advocate doubting whether there is any bug in start/w, but to think about whether there is any particularity of the explorer process of the resource explorer, which affects the performance of start/w.
md test
:: other codes
start /w test & echo Program is finished.
:: return errorlevel: 0
::start /w explorer test & echo Is finished.
:: return errorlevel: 1
echo return errorlevel: %errorlevel%
:: other codes
[ Last edited by willsort on 2006-6-20 at 11:17 ]
※ Batchinger 致 Bat Fans:请访问 批处理编程的异类 ,欢迎交流与共享批处理编程心得!
