怎样用FOR循环"简化"以下批处理,实现把findd.txt 中的盘符写入drive.txt文件(以给WBAT调用)?
find "C:\" findd.txt >nul
if not errorlevel 1 echo C:>>drive.txt
find "D:\" findd.txt >nul
if not errorlevel 1 echo D:>>drive.txt
find "E:\" findd.txt >nul
....
How to use a FOR loop to "simplify" the following batch processing to write the drive letters in findd.txt to the drive.txt file (for WBAT to call)?
find "C:\" findd.txt >nul
if not errorlevel 1 echo C:>>drive.txt
find "D:\" findd.txt >nul
if not errorlevel 1 echo D:>>drive.txt
find "E:\" findd.txt >nul
....