C:\scripts\NT>tpconfig -l Device Robot Drive Robot Drive Device Type Num Index Type DrNum Status Comment Name Path robot 0 - TLD - - - - \\.\Scsi6 +: drive - 0 dlt 1 UP - Drive0-1 \\.\Tape0 drive - 1 dlt 2 UP - Drive0-2 \\.\Tape1 drive - 2 dlt 3 UP - Drive0-3 \\.\Tape2 drive - 3 dlt 4 UP - Drive0-4 \\.\Tape3 drive - 4 dlt 5 UP - Drive0-5 \\.\Tape4 drive - 5 dlt 6 UP - Drive0-6 \\.\Tape5 drive - 6 dlt 7 UP - Drive0-7 \\.\Tape6 drive - 7 dlt 8 UP - Drive0-8 \\.\Tape7 drive - 8 dlt 9 UP - Drive0-9 \\.\Tape8 drive - 9 dlt 10 UP - Drive0-10 \\.\Tape9 drive - 10 dlt 11 UP - Drive0-11 \\.\Tape1 +0 drive - 11 dlt 12 UP - Drive0-12 \\.\Tape1 +1 drive - 12 dlt 13 UP - Drive0-13 \\.\Tape1 +2 drive - 13 dlt 14 UP - Drive0-14 \\.\Tape1 +3 drive - 14 dlt 15 UP - Drive0-15 \\.\Tape1 +4 drive - 15 dlt 16 UP - Drive0-16 \\.\Tape1 +5 robot 1 - TLD - - - - \\.\Scsi7 +: drive - 16 dlt 17 UP - Drive1-0 \\.\Tape1 +6 drive - 17 dlt 18 UP - Drive1-1 \\.\Tape1 +7 drive - 18 dlt 19 UP - Drive1-2 \\.\Tape1 +8 drive - 19 dlt 20 UP - Drive1-3 \\.\Tape1 +9 drive - 20 dlt 21 UP - Drive1-4 \\.\Tape2 +0 drive - 21 dlt 22 UP - Drive1-5 \\.\Tape2 +1 drive - 22 dlt 23 UP - Drive1-6 \\.\Tape2 +2 drive - 23 dlt 24 UP - Drive1-7 \\.\Tape2 +3 drive - 24 dlt 25 UP - Drive1-8 \\.\Tape2 +4 drive - 25 dlt 26 UP - Drive1-9 \\.\Tape2 +5 drive - 26 dlt 27 UP - Drive1-10 \\.\Tape2 +6 drive - 27 dlt 28 UP - Drive1-11 \\.\Tape2 +7 drive - 28 dlt 29 UP - Drive1-12 \\.\Tape2 +8 drive - 29 dlt 30 UP - Drive1-13 \\.\Tape2 +9 drive - 30 dlt 31 UP - Drive1-14 \\.\Tape3 +0 drive - 31 dlt 32 UP - Drive1-15 \\.\Tape3 +1 #### CODE ##### use strict; my $drive; my $count = -1; open( LIST, "tpconfig -l|" ) or die $!; while(<LIST>) { ($drive) = unpack '@0 A8',$_; ++$count if m/^drive/; system("tpconfig -delete -drive -index ${count}"); } #### ERRORS ######### Cannot delete drive index 0 Cannot delete drive index 0 Cannot delete drive index 17 Cannot delete drive index 32
In reply to RE: RE: Increment
by raj8
in thread Increment
by raj8
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |