[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 205
  • Last Modified:

I need a script to check if a tape was inserted into a tape drive for Windows 2000 NTbackup

I need a script to simply check if a tape was inserted into the tape drive - so far the scripts I found also check if the media is prepared etc - I NEED a script that ONLY checks if the tape was inserted or not - and it's quite urgent.

Thanks
0
dbdp
Asked:
dbdp
  • 4
1 Solution
 
star_trekCommented:
I found this script in perl:

#!/bin/sh
#
# Message for Tape backup


MAIL_LIST=`cat /home/operator/bin/operator.list`


LOG_DIR=/home/operator/log
test_tape=`mt -t /dev/rmt/0cbn status | grep DLT7000|grep -v grep|wc -l`


if [ $test_tape = 0 ]
then
        cat $LOG_DIR/msg_no_txt | mailx -s "System Warning" $MAIL_LIST
else
        cat $LOG_DIR/msg_txt | mailx -s "System Warning" $MAIL_LIST
fi


Create msg_no_txt to say "No tape inserted" and msg_txt to say "Backup to begin"
or something.
0
 
star_trekCommented:
In VB Script to check tape drives are installed or not, but it isn't about the tapes
http://www.microsoft.com/mspress/books/sampchap/6417.asp

0
 
dbdpAuthor Commented:
I'm not sure how to run a perl script - anything from command prompt?
I'll raise to 500 pts if someone manages
0
 
star_trekCommented:
You need to have perl installed and the script would be from command line: perl <scriptname>.pl


Look at the other link I gave you experts-exchange link, that has the vbscript so you don't have to install anything
0

Featured Post

The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now