Re: find out which partiton

From: Phil Robyn [MVP] (zipprobyn_at_berkeley.edu)
Date: 09/11/04


Date: Sat, 11 Sep 2004 08:09:36 -0700

Randall Flagg wrote:
> Hi there
>
> i have to find out which partitions do exist on harddisk 0 on a large number
> on computers.
>
> found a way to do it with a script using diskpart unfortunately this does
> not work on Windows NT.
>
> i need the existing drive letters for this partitions on Windows NT 4.0 SP6
> and Windows 2000 / XP...
>
> does anyone know a way to get this info by WSH-Script, shell script or a
> little command line tool?
>
> Thanks in advance
>
>

set valid_drives=
for %%a in (
   b c d e f g h i j k l m n o p q r s t u v w x y z
) do call :test %%a
echo Valid drives are: %valid_drives%
goto :EOF

:test
if exist %1: set valid_drives=%valid_drives% %1:
goto :EOF

-- 
Phil Robyn
Univ. of California, Berkeley
u n z i p   m y   a d d r e s s   t o   s e n d   e - m a i l


Relevant Pages

  • Re: Broadcast Message to multiple clients
    ... Note Windows NT-based client run the Messenger service by default. ... goto:LOOP ... goto:EOF ... > save a list of computers? ...
    (microsoft.public.windows.server.general)
  • Re: Set local admin password
    ... network. ... I have a list of computers in a text file that I would like to ... goto:EOF ...
    (microsoft.public.windows.server.scripting)
  • Re: Obtaining Last Logon Time for Domain User
    ... Subject: Re: Last time each NT account was accessed ... > framework 1.1 to run this tool (you can get it from Windows Update). ... >> goto:EOF ...
    (microsoft.public.windows.server.active_directory)
  • Re: recognize EOF condition when using GoToRecord Action
    ... VB experts have specifically recommended that GoTo ... I would recommend putting your code lines in ... learning what error number arises on an EOF ... And we have recordsets when we need to be slow, ...
    (comp.databases.ms-access)
  • Re: Generate password from computer name
    ... 009.:: workstation to translate to a password. ... endlocal&goto:EOF ... goto:EXITING ... 032.:: Translate a string to upper case ...
    (microsoft.public.win2000.cmdprompt.admin)