Subj : Re: NET USE Switches To : All From : Jonathan de Boyne Pollard Date : Wed Mar 06 2002 10:21 am From: Jonathan.de.Boyne.Pollard@f3.n342.z1.cereal.mv.com (Jonathan de Boyne Pollard) Subject: Re: NET USE Switches From: Jonathan de Boyne Pollard AD> C:\Home\Andrew DeFaria:For /f %%a in ('net view ^| find "\\"') do dir AD> %%a\c$ AD> %%a was unexpected at this time. CC> Well, you have just proven that you know very little about CMD. The CC> above was designed to run as a script, not directly from a prompt. Use CC> single percent signs when running from the command-line. Use CC> double percent signs when running in a batch file. AD>Oh, how, ahem... convienent. And consistant too! CC> Double-sigh. This has been standard DOS syntax for nearly 20 years. The fact that it has been this way for many years does not mean that it is inherently good. Once again, far from "trolling", he is making a good point. In fact, he is making a point that many others before him have made over the years. This different treatment of the percent character in the FOR command, depending from whether one is executing a script or a command line that was entered interactively, *is* inconsistent. Indeed, the fact that its FOR command has handling of the percent characters that is consistent for both scripts and interactive commands has been one of the minor selling points of JP Software's command interpreters for many years. -- |Fidonet: Jonathan de Boyne Pollard 1:342/3 | | Origin: The Cereal Port BBS (603)899-3335 199.125.78.133 (1:132/152) --- # Origin: (1:132/152.4) * Origin: Baddog BBS (1:218/903) .