Re: Distinguishing between a directory and a file

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



With Jerold's assistance, I found the recommendation ... it's an
interesting justification. With that in mind, the use of short-names as
a solution to the "nul" directory detection method would be troublesome
at best ... thanks for the info.

--
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

Stefan Kanthak wrote:
"Dean Wells [MVP]" <dwells@xxxxxxxxxxxxxxxxxxxxxx> wrote:

[...]

The following (albeit a more thorough derivative)
is functioning adequately for me in a number of scripts executing
~daily on Windows 2000, XP and Vista -

if exist %~s1\nul (echo yes) else (echo no)

This is not to say that caveats don't exist,

NTFS8dot3NameCreation for example?

This setting is recommended by MSFT in the W2K AD setup guidelines.
I'm using it on all my machines since NT4, and since I disabled it
in SETUPREG.HIV no single file/directory name has a "short" entry.
*I*'d never recommend a solution that doesn't work in general, at
least without placing a big CAVEAT anywhere around it, if I know
about it shortcomings.

Stefan


.



Relevant Pages

  • Re: bash versus sh test builtin
    ... Jeffrey Goldberg said: ... J> Does anyone have a recommendation of how to run this simple test in /bin/sh ... *) echo not root;; ...
    (freebsd-questions)
  • Re: Distinguishing between a directory and a file
    ... it's a recommendation with which I'm not ... Stefan Kanthak wrote: ... if exist %~s1\nul (echo yes) else ... This is not to say that caveats don't exist, ...
    (microsoft.public.win2000.cmdprompt.admin)
  • Re: HTTP Trace on Sun One
    ... Based on the recommendation, I've added the following ... >para in my obj.conf ... >Weng Lee ...
    (comp.security.unix)
  • Re: What bike for a returning rider
    ... I'd second the recommendation of the ZG1000, with the caveats that: ... so good for a new rider. ... It's getting very long in tooth. ...
    (rec.motorcycles)