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

Posted on 2006-04-19
Last Modified: 2010-04-13
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.

Question by:dbdp
    LVL 11

    Expert Comment

    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.
    LVL 11

    Expert Comment

    In VB Script to check tape drives are installed or not, but it isn't about the tapes

    LVL 11

    Expert Comment


    Author Comment

    I'm not sure how to run a perl script - anything from command prompt?
    I'll raise to 500 pts if someone manages
    LVL 11

    Accepted Solution

    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

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Join & Write a Comment

    NTFS file system has been developed by Microsoft that is widely used by Windows NT operating system and its advanced versions. It is the mostly used over FAT file system as it provides superior features like reliability, security, storage, efficienc…
    There are many benefits to finding online courses that align with your personal or career goals. Read more about our reasons for continuing your education in technology.
    how to add IIS SMTP to handle application/Scanner relays into office 365.
    Sending a Secure fax is easy with eFax Corporate ( First, Just open a new email message.  In the To field, type your recipient's fax number You can even send a secure international fax — just include t…

    745 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now