我正在尝试编写脚本来运行备份。我需要按名称找出磁盘的容量。 由于某种原因,它不起作用。有人看到问题了吗?
@ECHO OFF
REM ***** VERSION 1.1 ***** September 2011
ECHO *** Datensicherung wird gestartet ***
echo list volume>%temp%\diskpart.txt
echo exit>>%temp%\diskpart.txt
diskpart /s %temp%\diskpart.txt | find /I "TriaSave" >%temp%\Volume.log
for /f "tokens=3" %%i in (%TEMP%\Volume.log) do set DRIVE=%%i:
IF EXIST %DRIVE% GOTO SAVE
ECHO ---------------------------------------------------
ECHO ---------------------------------------------------
ECHO Es wurden keine USB Harddisks "TriaSave" gefunden !
ECHO ---------------------------------------------------
ECHO ---------------------------------------------------
PAUSE
Goto End
:SAVE
wbadmin start backup -include:c:,D: -backupTarget:%drive% -allcritical -vssFull -quiet
::shutdown -s -t 60 -c "Geplanter Shutdown in 1 Minute"
exit
:End
exit
exit
谢谢