hey all,
I want to match the computer name in a .bat file that with a variable. This is for mapping a printer based onto which machine a person is logging on to.
I know that the state below works:
IF %COMPUTERNAME% == LAB115
REM this will match only LAB115
REEM but I want to match LAB*
If %COMPUTERNAME begins with LAB* I want it to match. I know how to match this in perl, but I am lost in cmd script.
Any help would be greatly appreciated.
thanks,
Ben
I want to match the computer name in a .bat file that with a variable. This is for mapping a printer based onto which machine a person is logging on to.
I know that the state below works:
IF %COMPUTERNAME% == LAB115
REM this will match only LAB115
REEM but I want to match LAB*
If %COMPUTERNAME begins with LAB* I want it to match. I know how to match this in perl, but I am lost in cmd script.
Any help would be greatly appreciated.
thanks,
Ben