Batch file 按批量在XP中按卷标查找正确的U盘
Wmic在XP prof中没有音量功能。如何在XP中使用此代码?如果我可以通过标签找到正确的USB,我将使用%%D将一些文件复制到正确的USB记忆棒Batch file 按批量在XP中按卷标查找正确的U盘,batch-file,find,label,windows-xp,Batch File,Find,Label,Windows Xp,Wmic在XP prof中没有音量功能。如何在XP中使用此代码?如果我可以通过标签找到正确的USB,我将使用%%D将一些文件复制到正确的USB记忆棒 我在win7上使用该代码,但它在xp上不起作用这应该在xp及以上版本中起作用 for /f %%D in ('wmic volume get DriveLetter^, Label ^| find "ALP"') do set usb=%%D @echo off set "driveletter=" for %%a in (d e f g h i
我在win7上使用该代码,但它在xp上不起作用这应该在xp及以上版本中起作用
for /f %%D in ('wmic volume get DriveLetter^, Label ^| find "ALP"') do set usb=%%D
@echo off
set "driveletter="
for %%a in (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 %%a:\nul (vol %%a: |find /i "ALP" >nul && set driveletter=%%a)
)
if defined driveletter copy "your files" "d:\target"