Subscribe to Windows IT Pro
December 13, 2001 12:00 AM

JSI Tip 4540. What media do I have in my tape library?

Windows IT Pro
InstantDoc ID #75849
Rating: (0)


You can right-click My Computer and press Manage to use the Removable Storage snap-in to find out, or you can run PhysicalMedia.bat.

PhysicalMedia.bat uses the RSM command to write a file containing the media labels and associated GUIDs.

The syntax is:

PhysicalMedia OutputFileName

PhysicalMedia.bat contains:

@echo off
setlocal
if {%1}

{} goto syntax set file=%1 if NOT {%2}

{} goto syntax if not exist %~dp1 goto syntax if exist %file% del /q %file% If exist %temp%\PhysicalMedia.tmp del /q %temp%\PhysicalMedia.tmp for /f "Skip=2 Tokens=*" %%i in ('rsm view /tphysical_media /guiddisplay') do set line=%%i&call :sortin sort %temp%\PhysicalMedia.tmp /o %file% del /q %temp%\PhysicalMedia.tmp endlocal goto :EOF :syntax @echo PhysicalMedia OutputFileName endlocal goto :EOF :sortin if "%line%" EQU "The command completed successfully." goto :EOF @echo %line%>>%temp%\PhysicalMedia.tmp
NOTE: See tip 2265 » How do I perform an NTBackup in Windows 2000, without having to manually manage the media?




Related Content:

ARTICLE TOOLS

Comments
    There are no comments to display. Be the first one!
You must log on before posting a comment.

Are you a new visitor? Register Here

advertisement

advertisement

Windows is a trademark of the Microsoft group of companies. Windows IT Pro is used by Penton Media Inc. under license from owner.