Freeware utility expands command-line functions for tape drives

A new utility works with multiple tape drives in a system and increases command-line options.

Please let us know how useful you find this tip by rating it below. Do you have a useful Windows tip, timesaver...

or workaround to share? Submit it to our tip contest and you could win a prize!

While Windows has a built-in backup application that works with tape drives (NTBACKUP.EXE), the functions available for it from the command line are limited. This can be a problem if you want to use batch scripts or VBScript to automate how tapes are handled.

A utility called MT is a free program that emulates the functions of the UNIX mt command. Created by Peter Weston, it can work with multiple tape drives in a system by referring to them as tape0, tape1, supports tapes with variable block sizes (up to 5 MB) and allows reading and writing of individual files to tape as well as conventional tape manipulation commands such as retensioning and rewinding.

Here are some of the commands MT supports:

  • drivestatus: Displays the status of all tape drives in the system
  • mediastatus: Displays the status of the media in the specified tape drive
  • format: Formats QIC117 tapes
  • longerase: Forcibly erases everything on the specified tape partition
  • shorterase: Writes an end-of-tape marker at the current position
  • seekend: Moves to the end of the data in the current or specified partition
  • lock/unlock: Prevents or allows the current tape to be ejected

The program also supports creating tape partitions for drives that allow it.

Note that the program writes to tape in a raw data format -- not as a stream that can be read by, say, the Windows backup program. It also doesn't create archives with redundant recovery information; it simply writes the data byte for byte. For that reason, it may not be useful as a backup solution by itself, although it you could certainly use it in conjunction with another program that creates archives with recovery information.

MT also includes the complete source code; it is distributed under the GNU software license so it can be reused freely within an organization without a licensing fee.

Serdar Yegulalp is editor of the Windows Power Users Newsletter. Check it out for the latest advice and musings on the world of Windows network administrators -- and please share your thoughts as well!

This was last published in July 2005

Dig Deeper on Microsoft Windows Data Backup and Protection



Find more PRO+ content and other member only offers, here.



Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to: