@echo off
echo.

if "%OS2_SHELL%"=="" goto notos2
set dfsexe=dfsos2.exe
set cmdext=CMD
goto dfsee
:notos2
if "%OS%"==""        goto notnt
if "%OS%"=="DOS"     goto notnt
if "%OS%"=="MSDOS"   goto notnt
if "%OS%"=="DRDOS"   goto notnt
if "%OS%"=="IBMDOS"  goto notnt
if "%OS%"=="OPENDOS" goto notnt
set dfsexe=dfswin.exe
set cmdext=BAT
goto dfsee
:notnt
set dfsexe=dfsdos.exe
set cmdext=BAT
:dfsee

if "%1" == "?"   goto usage
if "%1" == "/?"  goto usage
if "%1" == "-?"  goto usage

%dfsexe% -l:%1 query %2 %3 %4 %5 %6 %7 %8 %9
echo.
echo Disk and partition information has been appended to the logfile
echo.
goto end

:usage
echo Get a file with minimal disk and partition information
echo to request help via email or on newsgroups.
echo.
echo Usage:  %0  [logfilename] [optional params, like 'part' command]
echo.
echo Examples:
echo  %0     laptop        Show query and log it to 'laptop.log'
echo  %0     -disk:2       Only show info on second physical disk
echo  %0     -v            Verbose list ALL partitions (large file!)
echo  %0     -t- -m- -w    Just show warnings about partitions and disks
echo.
echo Note: When running it multiple times, with the same logfilename,
echo       all information is APPENDED to the same file!
:end
