By registering with us, you'll be able to discuss, share and private message with other members of our community.
SignUp Now!First off, I'm on TCC 10,00,78. Things may have changed since then.Is this the expected behavior of WHICH?
Code:v:\> which wmiu* wmiu* is an external : D:\uty\wmiu*.exe v:\> u:\wmiuptime.exe Time: 2011/06/06 23:37:11 Boot: 2011/04/23 16:35:59 Uptime: 44 days 3 hours 1 minute 12 seconds
which /a wmiu*
> Is this the expected behavior of WHICH?
>
>
> Code:
> ---------
> v:\> which wmiu*
> wmiu* is an external : D:\uty\wmiu*.exe
>
> v:\> u:\wmiuptime.exe
>
> Time: 2011/06/06 23:37:11
> Boot: 2011/04/23 16:35:59
> Uptime: 44 days 3 hours 1 minute 12 seconds
> ---------
On the same lines, WHICH (sorry, couldn't resist) is first in your PATH list?If u:\ isn't in your PATH, and D:\uty is, then yes.
v:\> which wmiu*
wmiu* is an external : D:\uty\wmiu*.exe
v:\> which /a wmiu*
wmiu* is an external : D:\uty\wmiuptime.exe
v:\> d:\uty\wmiuptime.exe
Time: 2011/06/07 10:13:15
Boot: 2011/04/23 16:35:59
Uptime: 44 days 13 hours 37 minutes 16 seconds
command is an external : C:\WINDOWS\system32\command.com> which command
command is an external : C:\WINDOWS\system32\command.com> which /a command
comman* is an external : C:\WINDOWS\system32\comman*.com> which comman*
comman* is an external : C:\WINDOWS\system32\comman*.com> which /a comman*
comma* is an external : C:\WINDOWS\system32\comma*.com> which comma*
comma* is an external : C:\WINDOWS\system32\comma*.com> which /a comma*
comman? is an external : C:\WINDOWS\system32\comman?.com> which comman?
comman? is an external : C:\WINDOWS\system32\comman?.com> which /a comman?
comma?? is an external : C:\WINDOWS\system32\comma??.com> which comma??
comma?? is an external : C:\WINDOWS\system32\comma??.com> which /a comma??
com*nd is an external : C:\WINDOWS\system32\com*nd.com> which com*nd
C:\WINDOWS\system32\com*nd.com> echo %@search[com*nd]
C:\WINDOWS\system32\command.com> echo %@expand[%@search[com*nd]]
> Is this the expected behavior of WHICH?
The Help says, "WHICH does not support wildcard specifications unless you use the /A option." So, maybe you shouldn't do that.
Yes. If you want to use wildcards, you have to use /A.
v:\> echo %@search[comman*]
C:\WINDOWS\system32\comman*.com
> [Steve first pointed this out]. Is this
> expected behavior?