2 REM Cleanup left over files -- both before and after test run
5 setlocal ENABLEDELAYEDEXPANSION
9 IF NOT "@autochanger@" == "nul" (
11 FOR /f %%i in ( 'bin\mtx-changer @autochanger@ loaded 0 dummy 0' ) DO SET slot=%%i
13 bin\mtx-changer @autochanger@ unload 0 @tape_drive@ 0
14 bin\mtx-changer @autochanger@ load 2 @tape_drive@ 0
16 mt -f @tape_drive@ rewind
17 mt -f @tape_drive@ weof
20 REM If we have an autochanger always load tape in slot 1
22 FOR /f %%i in ( 'bin\mtx-changer @autochanger@ loaded 0 dummy 0' ) DO SET slot=%%i
24 bin\mtx-changer @autochanger@ unload 0 @tape_drive@ 0
25 bin\mtx-changer @autochanger@ load 1 @tape_drive@ 0
28 mt -f @tape_drive@ rewind
29 mt -f @tape_drive@ weof