C:\>tpconfig -l Device Robot Drive Robot Drive Device Type Num Index Type DrNum Status Comment Name Path robot 0 - TLD - - - - \\.\Scsi6: #### sub delete_drives3 { my $drive; $count = -1; open(TPCONFIG,"tpconfig -l|"); while() { ($drive) = unpack '@0 A5',$_; next if /^r/; next if /^D/; next if /^T/; ++$count; print "Deleting drive $count\n"; system("tpconfig -delete -drive -index ${count}"); }; };