[windows2000] Re: String Comparison in CMD or BAT script?
- From: "Costanzo, Ray" <rcostanzo@xxxxxxxxxxx>
- To: <windows2000@xxxxxxxxxxxxx>
- Date: Tue, 30 Dec 2003 09:29:46 -0500
SET PREFIX=%COMPUTERNAME:~0,4%
IF {%PREFIX%}=={TCAA} GOTO skip_notice
Ray at work
> -----Original Message-----
> From: Robert K Coffman Jr - Info From Data Corporation
>
> Anyone have an elegant solution to this?
>
> I have a series of servers, all beginning with the same 4
> letter string. I'd like to check for the first 4 letters,
> rather than the entire string. In other words, how can I do
> a LEFT$ in a script?
>
> current solution that blows:
>
> if '%computername%' == 'TCCA01' goto skip_notice
> if '%computername%' == 'TCCA02' goto skip_notice
> etc....
>
************************************************************************
**********************************
The information contained in this e-mail message is intended only for
the personal and confidential use BLAH BLAH BLAH
********************************************************
This Weeks Sponsor StressedPuppy.com Games
Feeling stressed out? Check out our games to
relieve your stress.
http://www.StressedPuppy.com
********************************************************
To Unsubscribe, set digest or vacation
mode or view archives use the below link.
http://thethin.net/win2000list.cfm
- Follow-Ups:
- [windows2000] Re: String Comparison in CMD or BAT script?
- From: Robert K Coffman Jr - Info From Data Corporation
Other related posts:
- » [windows2000] String Comparison in CMD or BAT script?
- » [windows2000] Re: String Comparison in CMD or BAT script?
- » [windows2000] Re: String Comparison in CMD or BAT script?
- » [windows2000] Re: String Comparison in CMD or BAT script?
- » [windows2000] Re: String Comparison in CMD or BAT script?
- [windows2000] Re: String Comparison in CMD or BAT script?
- From: Robert K Coffman Jr - Info From Data Corporation