Wildcard during directory lookup produces unexpected results
Posted: 12 Nov 2018 09:11
I have several files in my folder namely
a.cmd
b.cmd
ab.cmd
getFullPathFile_.cmd
getFullPbathFile_.CMD
Now trying to find anything like *a.cmd
expecting return a.cmd
but I get
That was unexpected that *a.cmd appears to match with *athFile_.CMD ??
even more unexpected is that getFullPbathFile_.CMD does not show up ??
I thought at first, maybe some path issue but it also happens on server2003 not only XP
I moved the test folder to drive C and it works as expected but the moment I move the folder to a mapped network drive which points to a NAS at W: this happens. This NAS is running linux with windows sharing. When I move it to another NAS at Y: ( same model NAS ) this also happens
Yet when I move to a mapped drive on another pc it again works as expected. And when I move to yet another NAS at U: ( This is a different older model also running linux with windows sharing. ) it again works as expected.
What I do know is that these NASses support characters that windows does not, but that can't be it because the old NAS supports these too yet it does not show this issue.
Ifail to understand why this is happening.
a.cmd
b.cmd
ab.cmd
getFullPathFile_.cmd
getFullPbathFile_.CMD
Now trying to find anything like *a.cmd
Code: Select all
@echo off
echo.
for /R %%? in ("*a.CMD") do echo(%%?
echo.
dir/B/S/A-D "*a.CMD"
echo.
for %%? in ("*a.CMD") do echo(%%?
pause
exit /b
but I get
Code: Select all
...\getFullPathFile_.CMD
...\a.cmd
...\getFullPathFile_.CMD
...\a.cmd
getFullPathFile_.CMD
a.cmd
Druk op een toets om door te gaan. . .
even more unexpected is that getFullPbathFile_.CMD does not show up ??
I thought at first, maybe some path issue but it also happens on server2003 not only XP
I moved the test folder to drive C and it works as expected but the moment I move the folder to a mapped network drive which points to a NAS at W: this happens. This NAS is running linux with windows sharing. When I move it to another NAS at Y: ( same model NAS ) this also happens
Yet when I move to a mapped drive on another pc it again works as expected. And when I move to yet another NAS at U: ( This is a different older model also running linux with windows sharing. ) it again works as expected.
What I do know is that these NASses support characters that windows does not, but that can't be it because the old NAS supports these too yet it does not show this issue.
Ifail to understand why this is happening.