ofcoss
Пример:
Код:
@Echo Off
Set nDrive=G:
Set nSerialRight=1234-5678
Set nSerialNew=
For /F "Skip=1 Tokens=2 Delims=:" %%A In ('Vol %nDrive%') Do Set nSerialNew=%%A
Set nSerialNew=%nSerialNew: =%
::Echo %nSerialNew%
If /I Not %nSerialRight%==%nSerialNew% GoTo :EOF