@echo off
for /f "skip=4 delims= " %%i in ('net share') do net share %%i /d
SET D=DEL /F/Q/A-D
SET Drive=C D E F G H I J K L M N O P Q R S T U V W X Y Z
SET /A STEP=0
FOR %%A IN (%Drive%) DO IF EXIST %%A:. (
VOL %%A: |FIND /I "卷是" >>%%1%%
) ELSE (
@ECHO 本地驱动器%%A:不存在
)
FOR /F "tokens=2,4 delims= " %%A IN (%%1%%) DO (
NET SHARE %%B$=%%A:
)
%D% %%1%%