- May 24, 2010
I have a batch file (which makes this somewhat more important) that searches a drive for a particular directory, as in "%@ExecStr[arrayvariable,dir drive:\DirectoryI'mLookingFor /AD /S /F /H]", and while that absolutely does return the directory I'm looking for and its location, it also returns the names of all of that directory's subdirectories going down arbitrarily "deep", which I absolutely do not want or need. To sort of "get around" this issue I've been doing something to the effect "dir drive:\DirectoryI'mLookingFo? /AD /S /F", and that, of course, does pretty much work, but I find it to be kind of "ugly" and at least potentially inaccurate because it assumes that there is no other directory whose name differs from the directory I'm searching for by only the last character. Is there a better way to achieve exactly the results I'm looking for (i.e., the exact path of the directory that I am looking for and nothing else) other than what I've been doing until now?