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.

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.

I found this script in perl:

# Message for Tape backup

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

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

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

Create msg_no_txt to say "No tape inserted" and msg_txt to say "Backup to begin"
or something.
In VB Script to check tape drives are installed or not, but it isn't about the tapes

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
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

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.