REM 根据卷标搜索随身固态U盘的盘符.BAT
REM 根据卷标搜索随身固态U盘的盘符.BAT
@echo off
for /f "tokens=2 delims==" %%a in ('wmic logicaldisk where "VolumeName='你的盘符卷标'" get Name /Value') do set PF=%%a
echo %PF%
PAUSE
;~ 根据卷标搜索随身固态U盘的盘符.AHK
根据卷标搜索随身固态U盘的盘符()
{
找到U盘:=false
DriveGet,盘符清单,List
loop,Parse,盘符清单
{
DriveGet,卷标,Label,%A_LoopField%:
IfInString,卷标,S随身固态U盘943GB
{
找到U盘:=true
return,%A_LoopField%
}
}
if (not 找到U盘)
{
return,0
}
}
https://www.autoahk.com/?p=16528
https://www.cnblogs.com/delphixx/p/11947308.html
www.cnblogs.com/delphixx