Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Batch file to show Network drives

373 views
Skip to first unread message

joshboski

unread,
Jun 3, 2008, 8:53:41 AM6/3/08
to
I am currently trying to write a batch file that will delete a list of
files from all of my network drives. The problem I am having is
getting the network drives. I am on a rather large network, and I
would like this to run on several different computers that may be
connected to different drives.

Bob I

unread,
Jun 3, 2008, 9:21:54 AM6/3/08
to
See "net use" and "If exist" in Windows Help and support. Also there is
a cmd prompt group that has some pretty sharp folks(cross posting this)

news://msnews.microsoft.com/microsoft.public.win2000.cmdprompt.admin

joshboski

unread,
Jun 3, 2008, 9:48:38 AM6/3/08
to

My apologies, that I did not include this also...I need the list of
local hard drives as well

Pegasus (MVP)

unread,
Jun 3, 2008, 9:59:27 AM6/3/08
to

"joshboski" <josh.bu...@gmail.com> wrote in message
news:4e9ec7fc-5000-4ab5...@j22g2000hsf.googlegroups.com...

As Bob recommended: net use (for networked drives), and
mountvol | find ":\" for local drives.


Pegasus (MVP)

unread,
Jun 3, 2008, 10:20:56 AM6/3/08
to

"joshboski" <josh.bu...@gmail.com> wrote in message
news:4e9ec7fc-5000-4ab5...@j22g2000hsf.googlegroups.com...

If you want something a little snazzier then you can use this script
file and massage it to give you the information you want. You need
to invoke it like so in your batch file: cscript //nologo c:\diskparms.vbs

Const Removable = 1
Const Fixed = 2
Const Network = 3
Const CDROM = 4
Const RAMDisk = 5

Set oFSO = CreateObject("Scripting.FileSystemObject")
Set drives = oFSO.Drives

NewLine=Chr(10)
Line = ""

For Each drive In drives
Line = Line & "Drive " & drive.Path
Line = Line & " " & ShowDriveType(Drive)
If drive.IsReady Then Line = Line & ", ready" Else Line = Line & ", not
ready"

If drive.IsReady Then
If drive.DriveType=Network Then
Line = Line & ", Label=" & drive.ShareName
Else
Line = Line & ", Label=" & drive.VolumeName
End If

Line = Line & ", FS=" & drive.FileSystem
Line = Line & ", Total=" & Int(drive.TotalSize/1000000)
Line = Line & ", Free=" & Int(drive.FreeSpace/1000000)
Line = Line & ", Available=" & Int(drive.AvailableSpace/1000000)
Line = Line & ", Serial=" & Hex(drive.SerialNumber)
End If

Line = Line & NewLine
Next
wscript.echo Line

Function ShowDriveType(Drive)
Select Case drive.DriveType
Case Removable
T = "Removable"
Case Fixed
T = "Fixed"
Case Network
T = "Network"
Case CDROM
T = "CD-ROM"
Case RAMDisk
T = "RAM Disk"
Case Else
T = "Unknown"
End Select
ShowDriveType = T
End Function


Dean Wells (MVP)

unread,
Jun 3, 2008, 10:47:08 AM6/3/08
to
Not as backwards compatible as some solutions offered here but,
nonetheless, worth a mention -

C:\>fsutil fsinfo drives

Drives: C:\ D:\ E:\ Z:\

... iterating through that list and using -

C:\>fsutil fsinfo drivetype <insert drive letter here>

... will return greater detail regarding the type of drive assignment.

--
Dean Wells [MVP / Directory Services]
MSEtechnology
[[ Please respond to the Newsgroup only regarding posts ]]
R e m o v e t h e m a s k t o s e n d e m a i l


"Bob I" <bir...@yahoo.com> wrote in message
news:er75LzXx...@TK2MSFTNGP06.phx.gbl...

Pegasus (MVP)

unread,
Jun 3, 2008, 11:15:30 AM6/3/08
to

"Dean Wells (MVP)" <dwe...@maskmsetechnology.com> wrote in message
news:%23EsU3iY...@TK2MSFTNGP06.phx.gbl...

> Not as backwards compatible as some solutions offered here but,
> nonetheless, worth a mention -
>
> C:\>fsutil fsinfo drives
>
> Drives: C:\ D:\ E:\ Z:\
>
> ... iterating through that list and using -
>
> C:\>fsutil fsinfo drivetype <insert drive letter here>
>
> ... will return greater detail regarding the type of drive assignment.
>
> --
> Dean Wells [MVP / Directory Services]
> MSEtechnology

For reasons which I am unable to explain, Microsoft turned the
output of the command "fsutil fsinfo drives" into a set of $00-delimited
strings. The result is that I am unable to extract the individual
drive letters out of the string "Drives: C:\ D:\ E:\ F:\ Q:\ R:\",
using a batch file. Do you know of a way to do this?


Timo Salmi

unread,
Jun 3, 2008, 11:17:18 AM6/3/08
to
joshboski <josh.bu...@gmail.com> wrote:
> My apologies, that I did not include this also...I need the list of
> local hard drives as well

53} How can I quietly test if a disk device is ready or not?
http://www.netikka.net/tsneti/info/tscmd053.htm

54} How can I get the type of a disk device?
http://www.netikka.net/tsneti/info/tscmd054.htm

All the best, Timo

--
Prof. Timo Salmi ftp & http://garbo.uwasa.fi/ archives 193.166.120.5
Department of Accounting and Business Finance ; University of Vaasa
mailto:t...@uwasa.fi <http://www.uwasa.fi/~ts/> ; FI-65101, Finland
Useful CMD script tricks http://www.netikka.net/tsneti/info/tscmd.htm

Dean Wells (MVP)

unread,
Jun 3, 2008, 11:48:23 AM6/3/08
to
Nod, I encountered the same limitation ... irritating isn't it.

Take a look at the 'bootSwitch.cmd' script here -

ftp://falcon.msetechnology.com/scripts/bootSwitch.cmd.txt

... it contains a means of resolving this behavior by exploiting an
all-too-often useful unicode oddity. Other ways were and probably still
are available though; didn't give it much thought after I came it that
one.

As I'm sure you know, part of the enjoyment of solving these kind of
annoyances is the creativity involved in making such a limited
environment play nicely ... this is one of my favs. to date.

--
Dean Wells [MVP / Directory Services]
MSEtechnology

[[ Please respond to the Newsgroup only regarding posts ]]
R e m o v e t h e m a s k t o s e n d e m a i l


"Pegasus (MVP)" <I....@fly.com.oz> wrote in message
news:evRJvyY...@TK2MSFTNGP06.phx.gbl...

Pegasus (MVP)

unread,
Jun 3, 2008, 3:18:05 PM6/3/08
to

"Dean Wells (MVP)" <dwe...@maskmsetechnology.com> wrote in message
news:uzbtFFZx...@TK2MSFTNGP06.phx.gbl...

> Nod, I encountered the same limitation ... irritating isn't it.
>
> Take a look at the 'bootSwitch.cmd' script here -
>
> ftp://falcon.msetechnology.com/scripts/bootSwitch.cmd.txt
>
> ... it contains a means of resolving this behavior by exploiting an
> all-too-often useful unicode oddity. Other ways were and probably still
> are available though; didn't give it much thought after I came it that
> one.
>
> As I'm sure you know, part of the enjoyment of solving these kind of
> annoyances is the creativity involved in making such a limited environment
> play nicely ... this is one of my favs. to date.
>
> --
> Dean Wells [MVP / Directory Services]

Nicely done and highly imaginative but not my favourite.
I'm a great user of batch files but I wonder how long it
took you to get these lines just right and how maintainable
they are . . .
fsutil fsinfo drives >"%TEMP%\%~n0.$$$"
for /f "tokens=1 delims=\ skip=10" %%d in
('cmd /u /c type "%TEMP%\%~n0.$$$" ^| find /v ""') do echo %%d


Esra Sdrawkcab

unread,
Jun 3, 2008, 3:26:54 PM6/3/08
to
Dean Wells (MVP) wrote:
> Nod, I encountered the same limitation ... irritating isn't it.
>
> Take a look at the 'bootSwitch.cmd' script here -
>
> ftp://falcon.msetechnology.com/scripts/bootSwitch.cmd.txt
>
> ... it contains a means of resolving this behavior by exploiting an
> all-too-often useful unicode oddity. Other ways were and probably still
> are available though; didn't give it much thought after I came it that
> one.
>
> As I'm sure you know, part of the enjoyment of solving these kind of
> annoyances is the creativity involved in making such a limited
> environment play nicely ... this is one of my favs. to date.
>


Ritchie in 2003 (in alt.msdos.batch.nt) gave:


for /f "tokens=1,2" %%a in ('fsutil fsinfo drives^|more') do (
for /f "tokens=1" %%c in ('echo/%%b %%a') do fsutil fsinfo
drivetype %%c
)

terribly long google groups ref:

http://groups.google.com/group/alt.msdos.batch.nt/tree/browse_frm/thread/9f10aa49e2ebd42f/8c23a39f7b68a048?rnum=1&q=fsutil+fsinfo+drives+batch&_done=%2Fgroup%2Falt.msdos.batch.nt%2Fbrowse_frm%2Fthread%2F9f10aa49e2ebd42f%2F7ee6dafb8e2e38f5%3Flnk%3Dst%26q%3Dfsutil%2Bfsinfo%2Bdrives%2Bbatch%26#doc_7ee6dafb8e2e38f5

Dean Wells (MVP)

unread,
Jun 3, 2008, 4:02:42 PM6/3/08
to
... a while ... and maintainable is in the eye of the beholder ;0)

--
Dean Wells [MVP / Directory Services]

MSEtechnology
[[ Please respond to the Newsgroup only regarding posts ]]
R e m o v e t h e m a s k t o s e n d e m a i l


"Pegasus (MVP)" <I....@fly.com.oz> wrote in message

news:Ov3JQ6ax...@TK2MSFTNGP04.phx.gbl...

Dean Wells (MVP)

unread,
Jun 3, 2008, 4:03:30 PM6/3/08
to
Assuming that works -- nice alternative.

--
Dean Wells [MVP / Directory Services]
MSEtechnology
[[ Please respond to the Newsgroup only regarding posts ]]
R e m o v e t h e m a s k t o s e n d e m a i l


"Esra Sdrawkcab" <ad...@127.0.0.1> wrote in message
news:2Wg1k.2763$E41....@text.news.virginmedia.com...

Dean Wells (MVP)

unread,
Jun 3, 2008, 4:21:34 PM6/3/08
to
I took a second look at that syntax and decided to try it, it didn't
work (on Vista at least.) C'est la vie ...

FWIW - my guess is that the OP is trying to handle the nuls in the same
manner but piping them through more vs. find. Since I can't fully test
it ... that's a bit of a hip-shot though.

--
Dean Wells [MVP / Directory Services]
MSEtechnology
[[ Please respond to the Newsgroup only regarding posts ]]
R e m o v e t h e m a s k t o s e n d e m a i l

"Dean Wells (MVP)" <dwe...@maskmsetechnology.com> wrote in message

news:eyihmTb...@TK2MSFTNGP02.phx.gbl...

Pegasus (MVP)

unread,
Jun 3, 2008, 4:30:41 PM6/3/08
to

"Dean Wells (MVP)" <dwe...@maskmsetechnology.com> wrote in message
news:eyihmTb...@TK2MSFTNGP02.phx.gbl...

> Assuming that works -- nice alternative.
>
> --
> Dean Wells [MVP / Directory Services]
> MSEtechnology

This line works under WinXP:
fsutil fsinfo drives|more


Pegasus (MVP)

unread,
Jun 3, 2008, 4:54:22 PM6/3/08
to

"Dean Wells (MVP)" <dwe...@maskmsetechnology.com> wrote in message
news:eyihmTb...@TK2MSFTNGP02.phx.gbl...

> Assuming that works -- nice alternative.
>
> --
> Dean Wells [MVP / Directory Services]

It appears that more.com under WinXP will translate Unicode to ASCII.


Timo Salmi

unread,
Jun 3, 2008, 5:17:01 PM6/3/08
to
Pegasus (MVP) <I....@fly.com.oz> wrote:
> This line works under WinXP:
> fsutil fsinfo drives|more

One traditional, UNIX-flavored way of getting rid of nul characters in a
string is using a TR port

fsutil fsinfo drives|tr -d \000

Or SED
fsutil fsinfo drives|sed -e "s/\x00/ /g"

But indeed, fortunately, the more trick does the same as can be readily
seen with any hex lister. Also, as was recently discussed in another
connection, the more conveniently adds a 0D 0A pair at the end of the
output, if it is missing. Well, in this case it is not.

Not that fsutil fsinfo is the only way of listing ones active drives!
The code below will give a list of devices that are _ready_

@echo off & setlocal enableextensions enabledelayedexpansion
for %%d in (a: 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 (
dir %%d\ > nul 2>&1
if !errorlevel! EQU 0 echo %%d
)
endlocal & goto :EOF

E.g. one might get
C:\_D\TEST>cmdfaq
c:
d:
e:

Timo Salmi

unread,
Jun 3, 2008, 5:48:43 PM6/3/08
to
Pegasus (MVP) <I....@fly.com.oz> wrote:
> It appears that more.com under WinXP will translate Unicode to ASCII.

I doubted that it makes the suggested full conversion, so a little test.
You may wish to try

more TestFileInLatin1.txt > Outfile.txt

where Latin1 is ISO 8859-1, i.e. a Unicode 256 subset. The results do
not seem to comply.

Herb Martin

unread,
Jun 3, 2008, 8:41:11 PM6/3/08
to

"Bob I" <bir...@yahoo.com> wrote in message
news:er75LzXx...@TK2MSFTNGP06.phx.gbl...

I have been meaning to ask advice or figure the following out myself
so I will just post my solution and describe where it has problems.

The following code WORKS on Vista, but not on 2003, nor on
XP if I recall the latter correctly.

Following is all one line (in a batch file):

@for /f "tokens=1-26 delims=\ " %%a in ('fsutil fsinfo drives') do @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 @fsutil fsinfo drivetype
%%A


=======================
Ugly but it works on Vista like this:

A: - Remote/Network Drive
C: - Fixed Drive
D: - Fixed Drive
E: - Fixed Drive
F: - CD-ROM Drive
G: - CD-ROM Drive
H: - CD-ROM Drive
J: - Remote/Network Drive
O: - Remote/Network Drive
P: - Remote/Network Drive
Q: - Remote/Network Drive
R: - CD-ROM Drive
S: - Remote/Network Drive
T: - Remote/Network Drive
U: - Remote/Network Drive
W: - Remote/Network Drive
X: - Remote/Network Drive
Y: - Remote/Network Drive
Z: - Remote/Network Drive

Herb Martin

unread,
Jun 3, 2008, 9:18:24 PM6/3/08
to

"Herb Martin" <ne...@learnquick.com> wrote in message
news:OSAywudx...@TK2MSFTNGP04.phx.gbl...

Ok, based on what someone (sorry) wrote in another message this
thread I finally figured out that XP/2003 were using NULLS instead
of spaces and so now my Perl version works on both all OSes:

Following is all one line for a batch file but works if pasted or typed in
directly:

@fsutil fsinfo drives | perl -n -e "@a=split /\s|\00/; foreach (@a) {next
unless s/\\//;print `fsutil fsinfo drivetype $_`;};"


OK, this works on 2003 using the | more trick (with +1 /S for efficiency):


@for /f %%a in ('fsutil fsinfo drives ^| more +1 /S') do @fsutil fsinfo
drivetype %%a


The MORE trick is problematic however if your command line is SMALLER
than the list of drives -- probably not a frequent issue but it will be an
issue
on rare occasions for some people.

I also admit that I cannot figure out Dean's unicode trick (quickly enough)
to extract and use it here.

--
Herb

Esra Sdrawkcab

unread,
Jun 4, 2008, 2:54:30 AM6/4/08
to
Mmm I see Ms have dropped the hoary "Abort Retry Ignore" message

Herb Martin

unread,
Jun 4, 2008, 4:15:44 AM6/4/08
to

The following works on 2003 and Vista but is really slow (at least
on 2003) when it encounters a disconnected network drive letter that *IS*
mapped:

ALL ONE LINE FOLLOWING:

for %%a in (A 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 @if
exist %%a:\lpt1 @fsutil fsinfo drivetype %%a:


This takes advantage of the pseudo file "LPT1" which has been
around since early DOS to prevent confusion with file names
that are the same as the Print device name (IIRC).

"if exist c:\lpt1" is TRUE if c:\ exists otherwise it is false.

I like the " | more +1 /S" best I think for 2003.

I thought I found a trick with FindStr that would convert the nulls
to dots, but it was just cosmetic on the screen and the pipe didn't
do that.

The following LOOKS good on the screen but isn't useful as far
as I can tell:

fsutil fsinfo drives | findstr \\

Is there anyway to get a NULL into "delims="????

Herb Martin

unread,
Jun 4, 2008, 5:23:17 AM6/4/08
to
Ok (after obsessing a bit) this work on (at least) XP/2003:

[Following is all one line for a batch file: drives.cmd]

@for /f %%a in ('fsutil fsinfo drives ^| find "\"') do @fsutil fsinfo
drivetype %%a


And this version works on (at least) Vista:
[Following is all one line for a batch file: drives.cmd]

@for /f "tokens=1-26 delims=\ " %%a in ('fsutil fsinfo drives') do @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 @fsutil fsinfo drivetype %%A


Oddly enought the XP/2003 is not less awkward.

Output looks like this (with fix width font so it lines up there):

A: - Remote/Network Drive
C: - Fixed Drive
D: - Fixed Drive
E: - Fixed Drive
F: - CD-ROM Drive
G: - CD-ROM Drive
H: - CD-ROM Drive
J: - Remote/Network Drive
O: - Remote/Network Drive
P: - Remote/Network Drive
Q: - Remote/Network Drive
R: - CD-ROM Drive
S: - Remote/Network Drive
T: - Remote/Network Drive
U: - Remote/Network Drive

V: - Remote/Network Drive


W: - Remote/Network Drive
X: - Remote/Network Drive
Y: - Remote/Network Drive
Z: - Remote/Network Drive

"Herb Martin" <ne...@learnquick.com> wrote in message
news:%23ufNxsh...@TK2MSFTNGP04.phx.gbl...

Dean Wells (MVP)

unread,
Jun 4, 2008, 9:14:38 AM6/4/08
to
It's always strange to me just how much pleasure I seem to derive from
working in this (let's face it) old & crappy little shell ... but,
seemingly like the rest of you, I'm quite happy doing so and will
readily jump on the 'let's see how many alternatives there are'
band-wagon whilst striving for the apparent golden-egg of batch syntax:
that ever elusive 'let's make it a one-liner.' Anyway, I came up with
this improvement on my original syntax, it too limits the number of
iterations resulting from the for loop to only those necessary (note
that it's a one-liner; well, sorta) -

fsutil fsinfo drives >"%TEMP%\%~n0.$$$" && for /f %%d in ('cmd /u /c
type "%TEMP%\%~n0.$$$" ^| more +11 ^| findstr "[A-Z]"') do fsutil fsinfo
drivetype %%d: & del "%TEMP%\%~n0.$$$" 2>nul

--
Dean Wells [MVP / Directory Services]

MSEtechnology
[[ Please respond to the Newsgroup only regarding posts ]]

R e m o v e t h e m a s k t o s e n d e m a i l


"Herb Martin" <ne...@learnquick.com> wrote in message
news:OSAywudx...@TK2MSFTNGP04.phx.gbl...
>

foxidrive

unread,
Jun 4, 2008, 12:18:20 PM6/4/08
to
On Wed, 4 Jun 2008 09:14:38 -0400, "Dean Wells \(MVP\)"
<dwe...@maskmsetechnology.com> wrote:

>It's always strange to me just how much pleasure I seem to derive from
>working in this (let's face it) old & crappy little shell ... but,
>seemingly like the rest of you, I'm quite happy doing so and will
>readily jump on the 'let's see how many alternatives there are'
>band-wagon whilst striving for the apparent golden-egg of batch syntax:
>that ever elusive 'let's make it a one-liner.'

Here's more conventional syntax in my contribution after following this
thread:


@echo off
for /f "delims=" %%a in ('fsutil fsinfo drives^|more') do call :next "%%a"
goto :EOF
:next
set "var=%~1"
set "var=%var:~-3,2%"
fsutil fsinfo drivetype %var%
shift
if not %1.==. goto :next

Dean Wells (MVP)

unread,
Jun 4, 2008, 12:45:20 PM6/4/08
to
Hi, I think there's an error in there, at least from Vista's perspective
... this is the result from Vista's shell <paste> -

C:\>foo

C:\>rem @echo off

C:\>for /F "delims=" %a in ('fsutil fsinfo drives |more') do call :next
"%a"

C:\>call :next "Drives: C:\ D:\ E:\ "

C:\>set "var=Drives: C:\ D:\ E:\ "

C:\>set "var=:\"

C:\>fsutil fsinfo drivetype :\
:\ - No such Root Directory

C:\>shift

C:\>if not . == . goto :next

C:\>goto :EOF

--
Dean Wells [MVP / Directory Services]
MSEtechnology
[[ Please respond to the Newsgroup only regarding posts ]]
R e m o v e t h e m a s k t o s e n d e m a i l


"foxidrive" <got...@woohoo.invalid> wrote in message
news:4vfd44l75et0ks3p1...@4ax.com...

foxidrive

unread,
Jun 4, 2008, 2:33:13 PM6/4/08
to
On Wed, 4 Jun 2008 12:45:20 -0400, "Dean Wells \(MVP\)"
<dwe...@maskmsetechnology.com> wrote:

>Hi, I think there's an error in there, at least from Vista's perspective
>... this is the result from Vista's shell <paste> -

Nods.

It works under XP pro - I don't have Vista to test with.

Herb Martin

unread,
Jun 4, 2008, 4:04:45 PM6/4/08
to

"foxidrive" <got...@woohoo.invalid> wrote in message
news:srnd449nnacjl4hfb...@4ax.com...

> On Wed, 4 Jun 2008 12:45:20 -0400, "Dean Wells \(MVP\)"
> <dwe...@maskmsetechnology.com> wrote:
>
>>Hi, I think there's an error in there, at least from Vista's perspective
>>... this is the result from Vista's shell <paste> -
>
> Nods.
>
> It works under XP pro - I don't have Vista to test with.


I have some extra *personal* criteria:

General principle: Runs on anybody's machine (where it makes sense)

No temp files if they can be avoided
No VBScript if it can be avoided -- once necessary go to Perl or Ruby
(But ONLY Perl is on ALL of my machines though Ruby is gaining
ground)
No external utilities if they can be avoided, Support tools not as bad as
other
stuff, Reskit, then UnxUtils, and some of my own personal tools, then
Cygwin

Prefer not to use environment variables, but this is not a rule
Once line when possible but don't get crazy
Working as a DosKey macros is desirable
(Although I use this for starting externa programs that aren't on the
path too)
Preferably works on all versions of the OS (where the program makes sense)

If it is too difficult for those rules then use Perl, Ruby, or a custom C/C#
program

So repeating my best efforts from last night:

[Following is all one line for a batch file: drives.cmd]

@for /f %%a in ('fsutil fsinfo drives ^| find "\"') do @fsutil fsinfo
drivetype %%a


And this version works on (at least) Vista:
[Following is all one line for a batch file: drives.cmd]

@for /f "tokens=1-26 delims=\ " %%a in ('fsutil fsinfo drives') do @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 @fsutil fsinfo drivetype %%A

Oddly enought the XP/2003 is not less awkward.

Output looks like this (with fix width font so it lines up there):

A: - Remote/Network Drive


C: - Fixed Drive
D: - Fixed Drive
E: - Fixed Drive
F: - CD-ROM Drive
G: - CD-ROM Drive
H: - CD-ROM Drive
J: - Remote/Network Drive
O: - Remote/Network Drive
P: - Remote/Network Drive
Q: - Remote/Network Drive
R: - CD-ROM Drive
S: - Remote/Network Drive
T: - Remote/Network Drive
U: - Remote/Network Drive

V: - Remote/Network Drive

Herb Martin

unread,
Jun 4, 2008, 4:07:16 PM6/4/08
to

"Dean Wells (MVP)" <dwe...@maskmsetechnology.com> wrote in message
news:%23j5g1Tk...@TK2MSFTNGP03.phx.gbl...

> It's always strange to me just how much pleasure I seem to derive from
> working in this (let's face it) old & crappy little shell ... but,
> seemingly like the rest of you, I'm quite happy doing so and will readily
> jump on the 'let's see how many alternatives there are' band-wagon whilst
> striving for the apparent golden-egg of batch syntax: that ever elusive
> 'let's make it a one-liner.' Anyway, I came up with this improvement on
> my original syntax, it too limits the number of iterations resulting from
> the for loop to only those necessary (note that it's a one-liner; well,
> sorta) -
>
> fsutil fsinfo drives >"%TEMP%\%~n0.$$$" && for /f %%d in ('cmd /u /c type
> "%TEMP%\%~n0.$$$" ^| more +11 ^| findstr "[A-Z]"') do fsutil fsinfo
> drivetype %%d: & del "%TEMP%\%~n0.$$$" 2>nul

Cool. I never did understand (or really isolate) your Unicode trick
from that big batch file -- the one to remove the NULLS.

I ended up using a pipe to find on XP -- after using more as the
next best thing but admitting that more will fail (or at least ask for
key to continue) if there are more drives than screen lines.)

This last isn't a giant deal as I keep my screen MUCH bigger than
the maximum (?) 26 drive letters but not everyone does all of the
time.

Esra Sdrawkcab

unread,
Jun 4, 2008, 5:17:08 PM6/4/08
to
Herb Martin wrote:
> Ok (after obsessing a bit) this work on (at least) XP/2003:
>
> [Following is all one line for a batch file: drives.cmd]
>
> @for /f %%a in ('fsutil fsinfo drives ^| find "\"') do @fsutil fsinfo
> drivetype %%a
>
>
well for me (XP Pro) it also gives a spurious Drives line:

Drives: - No such Root Directory


C:\ - Fixed Drive
D:\ - Fixed Drive
E:\ - Fixed Drive

Q:\ - CD-ROM Drive

where I have an "A" floppy drive with no disk present:

C:\WINDOWS>fsutil fsinfo drives

Drives: A:\ C:\ D:\ E:\ Q:\

C:\WINDOWS>

Dean Wells (MVP)

unread,
Jun 4, 2008, 5:13:42 PM6/4/08
to
Nod, I thought of the same thing re: the letter-depth but figured it's
so nigh-on moot for the same reasons ...

--
Dean Wells [MVP / Directory Services]
MSEtechnology
[[ Please respond to the Newsgroup only regarding posts ]]
R e m o v e t h e m a s k t o s e n d e m a i l

"Herb Martin" <ne...@learnquick.com> wrote in message

news:eW$cX6nxI...@TK2MSFTNGP02.phx.gbl...

Herb Martin

unread,
Jun 4, 2008, 6:26:31 PM6/4/08
to

"Esra Sdrawkcab" <ad...@127.0.0.1> wrote in message
news:oDD1k.3371$E41....@text.news.virginmedia.com...

You can "if test" those out if you need to do so.

[Following is all one line for batch file]
@for /f %%a in ('fsutil fsinfo drives ^| find "\"') do @if not
"%%a"=="Drives:" fsutil fsinfo drivetype %%a

I prefer this method to using the "skip=1" in the "for"-loop
options since apparently 2003 has no problem and only
XP shows this.

I had seen no problem so didn't bother -- turns out I
tested the "XP" version mostly on 2003 and didn't see
that XP and 2003 were (slightly) different.

Go figure.

Heck, I don't REALLY even know why the "find" on a "slash"
works but have been assuming that it is just using the Nulls
to spit out separate lines.

I didn't "think this through" to get to this solution but was semi-randomly
trying FindStr, Find, type, copy looking for anything that would turn
the nulls into something else (spaces.)


Herb Martin

unread,
Jun 4, 2008, 6:31:17 PM6/4/08
to

"Dean Wells (MVP)" <dwe...@maskmsetechnology.com> wrote in message
news:eQRnffox...@TK2MSFTNGP03.phx.gbl...

> Nod, I thought of the same thing re: the letter-depth but figured it's so
> nigh-on moot for the same reasons ...

That's why I did like the pipe to find "\".

Here's the current one that doesn't mess up with "Drives:"
on XP (I hadn't notice the error until Esra pointed that
out (I was testing under 2003 mostly and who would have
thought that XP and 2003 which both WORK basicly
would be different in a new way?)

[Following is all one line for a batch file]

@for /f %%a in ('fsutil fsinfo drives ^| find "\"') do @if not
"%%a"=="Drives:" fsutil fsinfo drivetype %%a


I didn't use "For" option SKIP=1 because it would be different
for XP vs. 2003.

Dean Wells (MVP)

unread,
Jun 4, 2008, 8:16:20 PM6/4/08
to
Sadly, that still doesn't work under Vista ... the one-liner I posted
earlier seems to work across the board ... or perhaps I missed
something? -->

fsutil fsinfo drives >"%TEMP%\%~n0.$$$" && for /f %%d in ('cmd /u /c
type "%TEMP%\%~n0.$$$" ^| more +11 ^| findstr "[A-Z]"') do fsutil fsinfo
drivetype %%d: & del "%TEMP%\%~n0.$$$" 2>nul

--

Dean Wells [MVP / Directory Services]
MSEtechnology
[[ Please respond to the Newsgroup only regarding posts ]]
R e m o v e t h e m a s k t o s e n d e m a i l


"Herb Martin" <ne...@learnquick.com> wrote in message

news:Ogx61Kpx...@TK2MSFTNGP02.phx.gbl...

Herb Martin

unread,
Jun 4, 2008, 8:25:07 PM6/4/08
to

"Dean Wells (MVP)" <dwe...@maskmsetechnology.com> wrote in message
news:OMizjFqx...@TK2MSFTNGP02.phx.gbl...

> Sadly, that still doesn't work under Vista ... the one-liner I posted
> earlier seems to work across the board ... or perhaps I missed
> something? -->
>
> fsutil fsinfo drives >"%TEMP%\%~n0.$$$" && for /f %%d in ('cmd /u /c
> type "%TEMP%\%~n0.$$$" ^| more +11 ^| findstr "[A-Z]"') do fsutil fsinfo
> drivetype %%d: & del "%TEMP%\%~n0.$$$" 2>nul

Sorry, I didn't repost my Vista version in that last messages but
had done so elsewhere this thread. It had been working all along.

@for /f "tokens=1-26 delims=\ " %%a in ('fsutil fsinfo drives') do @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 @fsutil fsinfo drivetype %%A

I have been using this for about a year on Vista.

No temp files.

I just use an OS check to decide which of the two to use,
as I prefer that to temp files and the (highly technical) issue
with more etc.

Harlan Grove

unread,
Jun 5, 2008, 12:19:53 AM6/5/08
to
"Herb Martin" <n...@learnquick.com> wrote...

>The following works on 2003 and Vista but is really slow (at least
>on 2003) when it encounters a disconnected network drive letter that *IS*
>mapped:
>
>ALL ONE LINE FOLLOWING:
>
>for %%a in (A 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 @if
>exist %%a:\lpt1 @fsutil fsinfo drivetype %%a:
...

The following seems to work under XP. Also all one command line.

(for %d in (A 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 ^
@fsutil fsinfo drivetype %d:) | find "No such " /v

This produces the following results, not including the lines of
dashes.

------
B: - Remote/Network Drive


C: - Fixed Drive
D: - Fixed Drive

F: - Remote/Network Drive
G: - CD-ROM Drive
H: - Remote/Network Drive
I: - Remote/Network Drive
J: - Remote/Network Drive
K: - Remote/Network Drive
L: - Remote/Network Drive
M: - Remote/Network Drive
P: - Remote/Network Drive


S: - Remote/Network Drive
T: - Remote/Network Drive
U: - Remote/Network Drive

V: - Remote/Network Drive


W: - Remote/Network Drive
X: - Remote/Network Drive

------

Maybe not elegant, but there are times brute force is expedient.

Herb Martin

unread,
Jun 5, 2008, 1:19:04 AM6/5/08
to

"Harlan Grove" <hrl...@gmail.com> wrote in message
news:0224e300-0337-4973...@p39g2000prm.googlegroups.com...

> "Herb Martin" <n...@learnquick.com> wrote...
>>The following works on 2003 and Vista but is really slow (at least
>>on 2003) when it encounters a disconnected network drive letter that *IS*
>>mapped:
>>
>>ALL ONE LINE FOLLOWING:
>>
>>for %%a in (A 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 @if
>>exist %%a:\lpt1 @fsutil fsinfo drivetype %%a:
> ...
>
> The following seems to work under XP. Also all one command line.
>
> (for %d in (A 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 ^
> @fsutil fsinfo drivetype %d:) | find "No such " /v

My experience is that it is much slower to check invalid
drive letters than to just check those that (FSUtil says) exist,
but that doesn't seem to be the case with this command you
offer.

It works on (at least) XP, 2003, and Vista so I think yours is
the best I have seen so far, and I am sorry I didn't try going
right at all the drives to start with. <GRIN>

I guess it turns out that the "Fsutil fsinfo drives" is just a waste of
time and effort (programmer and computer).


Thanks

Esra Sdrawkcab

unread,
Jun 5, 2008, 3:31:12 AM6/5/08
to
Herb Martin wrote:
> "Dean Wells (MVP)" <dwe...@maskmsetechnology.com> wrote in message
> news:eQRnffox...@TK2MSFTNGP03.phx.gbl...
>> Nod, I thought of the same thing re: the letter-depth but figured it's so
>> nigh-on moot for the same reasons ...
>
> That's why I did like the pipe to find "\".
>
> Here's the current one that doesn't mess up with "Drives:"
> on XP (I hadn't notice the error until Esra pointed that
> out (I was testing under 2003 mostly and who would have
> thought that XP and 2003 which both WORK basicly
> would be different in a new way?)
>
> [Following is all one line for a batch file]
>
> @for /f %%a in ('fsutil fsinfo drives ^| find "\"') do @if not
> "%%a"=="Drives:" fsutil fsinfo drivetype %%a
>
>
> I didn't use "For" option SKIP=1 because it would be different
> for XP vs. 2003.
>

Sure that skips the text "Drives:" but it doesn't pick up my floppy
drive letter

C:\WINDOWS>qdrvc


C:\ - Fixed Drive
D:\ - Fixed Drive
E:\ - Fixed Drive

Q:\ - CD-ROM Drive

Esra Sdrawkcab

unread,
Jun 5, 2008, 3:35:43 AM6/5/08
to
Dean Wells (MVP) wrote:
> Sadly, that still doesn't work under Vista ... the one-liner I posted
> earlier seems to work across the board ... or perhaps I missed
> something? -->
>
> fsutil fsinfo drives >"%TEMP%\%~n0.$$$" && for /f %%d in ('cmd /u /c
> type "%TEMP%\%~n0.$$$" ^| more +11 ^| findstr "[A-Z]"') do fsutil fsinfo
> drivetype %%d: & del "%TEMP%\%~n0.$$$" 2>nul
>
Yup that works here (XP Pro). I guess we were hoping for a
shorter/tidier solution.

Esra Sdrawkcab

unread,
Jun 5, 2008, 3:40:59 AM6/5/08
to
Yes, Ok here.

C:\WINDOWS>(for %d in (A 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 @


fsutil fsinfo drivetype %d: ) | find "No such " /v

A: - Removable Drive


C: - Fixed Drive
D: - Fixed Drive

Herb Martin

unread,
Jun 5, 2008, 4:47:14 AM6/5/08
to

"Esra Sdrawkcab" <ad...@127.0.0.1> wrote in message
news:4DM1k.3516$E41....@text.news.virginmedia.com...

> Herb Martin wrote:
>> "Dean Wells (MVP)" <dwe...@maskmsetechnology.com> wrote in message
>> news:eQRnffox...@TK2MSFTNGP03.phx.gbl...
>>> Nod, I thought of the same thing re: the letter-depth but figured it's
>>> so nigh-on moot for the same reasons ...
>>
>> That's why I did like the pipe to find "\".
>>
>> Here's the current one that doesn't mess up with "Drives:"
>> on XP (I hadn't notice the error until Esra pointed that
>> out (I was testing under 2003 mostly and who would have
>> thought that XP and 2003 which both WORK basicly
>> would be different in a new way?)
>>
>> [Following is all one line for a batch file]
>>
>> @for /f %%a in ('fsutil fsinfo drives ^| find "\"') do @if not
>> "%%a"=="Drives:" fsutil fsinfo drivetype %%a
>>
>>
>> I didn't use "For" option SKIP=1 because it would be different
>> for XP vs. 2003.
>>
>
> Sure that skips the text "Drives:" but it doesn't pick up my floppy drive
> letter


Harlan's works best (likely even for that A:) and it is pretty much the
simplest (not QUITE elegant but it beats mine) and uses no weird
tricks, external utilities, nor temp files.

It works as is on (at least) XP, 2003, and Vista:

[All one line for batch file:]
@(for %%d in (A 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
@fsutil fsinfo drivetype %%d:) | @find "No such " /v


Dean Wells (MVP)

unread,
Jun 5, 2008, 8:41:14 AM6/5/08
to
Sadly, that too seems to fail on Vista.

Herb, I may be missing something here but the later version of my
original syntax works across the board and, as I mentioned earlier,
iterates through only those drive assignments that already exist. Are
you adverse to that particular syntax? Perhaps because it uses a TEMP
file per your earlier 'best-practices'?

--
Dean Wells [MVP / Directory Services]
MSEtechnology
[[ Please respond to the Newsgroup only regarding posts ]]
R e m o v e t h e m a s k t o s e n d e m a i l

"Herb Martin" <ne...@learnquick.com> wrote in message

news:%23S5Ctus...@TK2MSFTNGP02.phx.gbl...

Dean Wells (MVP)

unread,
Jun 5, 2008, 8:44:45 AM6/5/08
to
Correct, a mis-paste on my part; that does work on Vista.

--
Dean Wells [MVP / Directory Services]
MSEtechnology
[[ Please respond to the Newsgroup only regarding posts ]]
R e m o v e t h e m a s k t o s e n d e m a i l

"Dean Wells (MVP)" <dwe...@maskmsetechnology.com> wrote in message

news:%23lrP1lw...@TK2MSFTNGP05.phx.gbl...

Dean Wells (MVP)

unread,
Jun 5, 2008, 9:08:39 AM6/5/08
to
"Herb Martin" <ne...@learnquick.com> wrote in message
news:%235P3Bju...@TK2MSFTNGP04.phx.gbl...


Hehe ... if I didn't exploit the specific behaviors that go beyond a
command's original purpose ('trick' seems so negative), I'd unacceptably
limit the scope of what a batch file can do for me. Take this simple
example -- the ability to echo out text and hold the cursor at the end
of the line rather than be subject to the implicit CRLF ... that's an
odd use of a set statement for sure but is commonplace because it's
necessary. Keeping some of the best-practices you mentioned in mind, my
feeling is that the unbelievably severe limitations of this aging shell
we seem to sooo love make it necessary to exploit any and all
predictable/consistent behaviors.

I agree entirely on using only core binaries unless absolutely no other
solution exists but I'm only adverse to the use of TEMP files to the
point of it not compromising the script's ability to do what it does in
the best way possible. My avoidance of TEMP files is motivated only by
the need to clean them up and the additional code required to do so;
nothing more. Let's face it -- when was the last time a problem
occurred because of a TEMP file that wasn't attributed to poor syntax (I
can't recollect even one) -- if the creation of the TEMP file failed for
any other reason, the effect on the script is probably a much lesser
concern than its root cause.

In this particular case, my feeling is that avoiding the use of TEMP
files at the expense of checking types for drive assignments that don't
even exist is, to my mind, an example of such a compromise ... but
that's just me and, of course, I like my syntax better :0)

Dean Wells (MVP)

unread,
Jun 5, 2008, 9:10:39 AM6/5/08
to
Sheesh ... that's 'sposed to say 'correction' ... man, this could go on
forever ...

<double-checking> ...
<checking again> ...
<submit>

--
Dean Wells [MVP / Directory Services]
MSEtechnology
[[ Please respond to the Newsgroup only regarding posts ]]
R e m o v e t h e m a s k t o s e n d e m a i l


"Dean Wells (MVP)" <dwe...@maskmsetechnology.com> wrote in message

news:%23u1uynw...@TK2MSFTNGP04.phx.gbl...

Harlan Grove

unread,
Jun 5, 2008, 11:58:48 AM6/5/08
to
"Dean Wells \(MVP\)" <dwe...@maskmsetechnology.com> wrote...
...

>I agree entirely on using only core binaries unless absolutely no other
>solution exists but I'm only adverse to the use of TEMP files to the
>point of it not compromising the script's ability to do what it does in
>the best way possible. My avoidance of TEMP files is motivated only by
>the need to clean them up and the additional code required to do so;
...

Raises a few questions.

1. May cscript now be considered a core utility?
2. How about scripted use of debug?
3. Does a vanilla Vista install include the 16-bit DEBUG.COM?
4. What's the concern about temp files? All it takes is something like

set tf="%TEMP%\%~0.tmp"
somecommand > %tf%
:
del %tf%

so a set command and a delete command. Not exactly huge, unwieldy
overhead.

Dean Wells (MVP)

unread,
Jun 5, 2008, 1:05:37 PM6/5/08
to
"Harlan Grove" <hrl...@gmail.com> wrote in message
news:153e1999-68c7-46fb...@w5g2000prd.googlegroups.com...


I'm not sure who you're posing your questions to since my comments were
in response to Herb's list of best-practices but I'm happy to throw in
my opinion ... solicited or otherwise :0) -

1. Yes ... but Vista brings its own concerns to the table.
2. Of course.
3. Yes ... <begin paste>

C:\>ver

Microsoft Windows [Version 6.0.6001]

C:\>debug
-

</paste>

4. Temp files don't particularly concern me, and certainly not to the
point where I'd hesitate using them. I am, however, always conscious of
the complications they introduce but, in many cases, such complications
simply cannot be avoided or they're tolerable (relatively speaking.)
For example, if the script is executed _twice_ (whether deliberately or
inadvertently), logic issues may result since the script may branch
incorrectly based on the content of the TEMP file which is now
out-of-state since the second instance polluted it. Of course, there
are even ways around that with additional logic but ... well, you can
fill in the rest. Anyways, I'll happily volunteer that I'm describing
edge-cases here so I'll shut-up on that topic and close with -- I use
TEMP files almost across the board because, IMO, to not use them
unnecessarily limits functionality.

Herb Martin

unread,
Jun 5, 2008, 2:58:51 PM6/5/08
to

"Dean Wells (MVP)" <dwe...@maskmsetechnology.com> wrote in message
news:OEXHR2wx...@TK2MSFTNGP04.phx.gbl...

> Sheesh ... that's 'sposed to say 'correction' ... man, this could go on
> forever ...
>
> <double-checking> ...
> <checking again> ...
> <submit>


No problem. Below is the part of the message I was
going to send you before you re-replied that you had
it working <grin>

Don't worry about it. Like you this stuff intrigues me...

I do like Harlan's best: works on all OSes without any
temp files etc. -- I would only like it better if that pipe
to find could be removed <grin>

I tested Harlan's on:
Microsoftr Windows VistaT Ultimate
6.0.6001 Service Pack 1 Build 6001

(@for %%d in (A 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

@fsutil fsinfo drivetype %%d:) | @find "No such " /v


That is the actual (single) line cut from my current batch file as
I switched to his version -- slightly modified by @ signs.

This same line worked on:

Microsoft(R) Windows(R) Server 2003, Enterprise Edition
5.2.3790 Service Pack 2 Build 3790

Microsoft Windows XP Professional
5.1.2600 Service Pack 2 Build 2600

Herb Martin

unread,
Jun 5, 2008, 3:11:55 PM6/5/08
to

"Harlan Grove" <hrl...@gmail.com> wrote in message
news:153e1999-68c7-46fb...@w5g2000prd.googlegroups.com...
> "Dean Wells \(MVP\)" <dwe...@maskmsetechnology.com> wrote...
> ...
>>I agree entirely on using only core binaries unless absolutely no other
>>solution exists but I'm only adverse to the use of TEMP files to the
>>point of it not compromising the script's ability to do what it does in
>>the best way possible. My avoidance of TEMP files is motivated only by
>>the need to clean them up and the additional code required to do so;

I really agree with everything Dean wrote above and in the previous
message except to DEGREE, where I will try a bit harder to avoid
temps. Sets that are complicated only to a small degree.

The only reason I posted "my" preferences was not to say they were
necessarily best practices, but to make explicit my own prejudices
and offer them to anyone who did think they were a good idea (some
are like avoiding "add-on" utilities whenever practical.)

> Raises a few questions.
>
> 1. May cscript now be considered a core utility?

It's on all modern machines so logically the answer is "Yes", but for
me the answer remains "No", since I don't like VBScript and once
I must make that break I tend to go "all the way to Perl."

Perl is on all of my machines. I am partly responsible for getting
Perl added to the (3.51) Resource Kit and am only sorry that
we didn't get it into the product (almost but the CD-ROM/Build
was already locked for changes by that time.)

> 2. How about scripted use of debug?

Probably about the same (for me) -- I use to use that back in DOS
days when I didn't always have Perl. One issue with this is that it
changes the Command Prompt size and thus induces a disconcerting
visual effect as it runs and quits.

Truthfully I thought it was gone. <grin>

Exactly the same for EdLin.

> 3. Does a vanilla Vista install include the 16-bit DEBUG.COM?

Apparently. Mine does.

And I found the other night that it also has EdLin.

I was actually considering using EdLin at one point for THIS problem.

> 4. What's the concern about temp files? All it takes is something like
>
> set tf="%TEMP%\%~0.tmp"
> somecommand > %tf%
> :
> del %tf%
>
> so a set command and a delete command. Not exactly huge, unwieldy
> overhead.

You may consider it mere prejudice on my part. I don't like possible
race considitions with the same file name in mupliple windows, trying to
come up with unique names, clean up if the batch file is aborted, etc

The pseudo environment variable %Random% can (help) solve this at
the expense of more complication....

BTW: I am not a fan (so far) of PowerShell either. (To little, too late,
too slow [to start], not ubiquitous [yet], too awkward.)

Herb Martin

unread,
Jun 5, 2008, 3:16:56 PM6/5/08
to

"Dean Wells (MVP)" <dwe...@maskmsetechnology.com> wrote in message
news:u9%23kh5yx...@TK2MSFTNGP03.phx.gbl...

> "Harlan Grove" <hrl...@gmail.com> wrote in message
> news:153e1999-68c7-46fb...@w5g2000prd.googlegroups.com...
>> "Dean Wells \(MVP\)" <dwe...@maskmsetechnology.com> wrote...
>> ...
>>>I agree entirely on using only core binaries unless absolutely no other
>>>solution exists but I'm only adverse to the use of TEMP files to the
>>>point of it not compromising the script's ability to do what it does in
>>>the best way possible. My avoidance of TEMP files is motivated only by
>>>the need to clean them up and the additional code required to do so;
>> ...
>>
>> Raises a few questions.
>>
>> 1. May cscript now be considered a core utility?
>> 2. How about scripted use of debug?
>> 3. Does a vanilla Vista install include the 16-bit DEBUG.COM?
>> 4. What's the concern about temp files? All it takes is something like

> I'm not sure who you're posing your questions to since my comments were in
> response to Herb's list of best-practices but I'm happy to throw in my
> opinion ... solicited or otherwise :0) -

Calling my own idiosyncratic list "best-practices" is going much further
than
necessary Dean. <grin>

They are just my practices, some of them perhaps good but nowhere
near "best". <big grin>

>> 1. May cscript now be considered a core utility?
>> 2. How about scripted use of debug?
>> 3. Does a vanilla Vista install include the 16-bit DEBUG.COM?
>> 4. What's the concern about temp files? All it takes is something like

> 1. Yes ... but Vista brings its own concerns to the table.


> 2. Of course.
> 3. Yes ... <begin paste>

For instance, I agreed with you about CScript but mentioned that I
just don't like it and will go all the way to Perl if CScript proves
necessary.

Exception: If someone gives me a working script which uses CScript
then perhaps I would just use it -- feeling no compulsion to rewrite it.

Microsoft could easiy have added Perl, awk, sed, grep, back in
NT 3.51 and this would all be so much easier.


0 new messages