MT.exe - command line Windows NT/2000/XP tape utility (GPL)
MT was written to erase an old (tar) backup tape which Windows-XP backup refused to overwrite... but I got curious along the way, and added support for various tape functions:
- Erase (Long and short)
- Drive and tape status (full details of TAPE_GET_DRIVE_PARAMETERS and TAPE_GET_MEDIA_PARAMETERS structures)
- Format (QIC117 only according to the documentation)
- Load and unload (eject) a tape
- Lock and unlock the tape in the drive
- Repartition the tape (if your drive supports it)
- Read/dump from tape to a file
- Seek by absolute address
- Retension the tape
- Rewind the tape
so it is a cut down version of the rsm command, but without the complexity (which doesn't seem to be in the published API anyway...)
Download the source (under 35Kb, includes licence) executable (under 25Kb) or compressed package (under 25k zip for those who like to conserve bandwidth :-) This software is released under the GNU GPL (General Public Licence)
v0.15 notes:
- fix for wrong block size during read (from Jason Bingham)
v0.12 notes:
- Added missing eject command (alias for unload)
- Most of the commands will fail if the drive is busy. The mediastatus command will wait for the current operation to complete before returning (useful for scripts)
v0.11 notes:
- Might be useful for very crude data recovery... use seek or repeatedly read to move past filemarks
- Most of the options will complete before returning (unnerving if you can't see or hear the drive)...
- Nice if it understood Kb, Mb and Gb for positioning...but it doesn't
- read only works on whole tape blocks (for no good reason)
- Comments, bugs, fixes... or even just found mt useful? e-mail me on peter.weston at my home domain (holistech.co.uk).
| Example | Description |
|---|---|
| mt longerase | erase the tape in the first tape drive (tape0)... (the command mt was written for) |
| mt drivestatus | show the status of the first drive (tape0) |
| mt mediastatus tape1 | show the status of the tape in the second drive (tape1) |
| mt rewind | rewind the tape in the first drive (tape0) |
| mt eject tape2 | eject the tape in the third drive (tape2) |
| mt read mytape.dmp | copy contents of the tape in the first drive (tape0) to the file mytape.dmp |
| mt read tape1 mytape.dmp 32768 | copy 32768 bytes from the tape in the second drive (tape1) to the file mytape.dmp |
Copyright (c) 2001-2002 Peter Weston


