@echo offset str=c d e f g h iecho 当前硬盘分区如下:for %%K in (%str%) do if exist %%K: echo %%K:pause 把ab盘去掉,因为你没有软盘,所以报错,以后建议调试bat可以弄为echo on