【批处理】查看本机所有盘符
1个回答
展开全部
@echo off
for %%i in (a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z) do if exist %%: echo 存在%%i 盘
for %%i in (a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z) do if exist %%: echo 存在%%i 盘
追问
::复制到记事本,另存为drives.bat
@echo off
color 2
title 所有盘符
setlocal EnableDelayedExpansion
for /f "delims=\" %%i in ('fsutil fsinfo drives^|more') do (
set var=%%i
set drive=!var:~-2!
echo !drive!
)
pause>nul
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询