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
dbdpAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Windows 2000

From novice to tech pro — start learning today.