Title: FW: Test Whether Variable Exists
He's probably having a problem with his e-mail.  Unsubbing him isn't the answer.  I think there was a bug in OL caused by IE if I'm not mistaken, for example.
-----Original Message-----
From: EALES, Jack / RSAIFS - IOM [mailto:[EMAIL PROTECTED]]
Sent: Friday, September 07, 2001 6:35 AM
To: NT System Admin Issues
Subject: RE: Test Whether Variable Exists

Stu - can you get this guy unsubbed before he drives us all mad? A blank response to every posting is getting a little annoying.... ;-)
 
Cheers
Jack
-----Original Message-----
From: Pete Karhatsu [mailto:[EMAIL PROTECTED]]
Sent: 07 September 2001 14:17
To: NT System Admin Issues
Subject: FW: Test Whether Variable Exists

THIS MESSAGE ORIGINATED ON THE INTERNET - Please read the detailed disclaimer below.
----------------------------------------------------------------------



-----Original Message-----
From: Colin Leeson [mailto:[EMAIL PROTECTED]]
Sent: Thursday, September 06, 2001 9:48 PM
To: NT System Admin Issues
Subject: RE: Test Whether Variable Exists


Try this
Date /t >>test.txt
...and notice the space after the date

Col

-----Original Message-----
From: Andrew S. Baker [mailto:[EMAIL PROTECTED]]
Sent: Friday, 7 September 2001 11:44
To: NT System Admin Issues
Subject: RE: Test Whether Variable Exists


Type either of the following at the command line:

 SET TEST= HELLO

or


 SET TEST=HELLO    (with a trailing space)


Now type:

 ECHO "%TEST%"



==============================================================
 ASB - http://www.ultratech-llc.com/KB/?File=~MoreInfo.TXT
==============================================================
 "Little progress can be made by merely attempting to repress  what is evil.
Our great hope lies in developing what is  good." -- President Calvin
Coolidge (1872-1933).



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 Keystrokes are an Endangered Species:  http://www.shortkeys.com/
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~



>-----Original Message-----
>From: Correa, Andre [mailto:[EMAIL PROTECTED]]
>Sent: Thursday, September 06, 2001 8:17 PM
>To: NT System Admin Issues
>Subject: RE: Test Whether Variable Exists
>
>
>How do you set an environment variable with a space??  I
>have never seen
>that
>
>____________________________________________
>Andre Correa
>Senior Manager/Information Technology
>Lexitron, Inc
>(201) 892-6399
>
> -----Original Message-----
>From:  Andrew Baker [mailto:[EMAIL PROTECTED]]
>Sent:  Thursday, September 06, 2001 7:14 PM
>To:    NT System Admin Issues
>Subject:       RE: Test Whether Variable Exists
>
>Using double quotes is best because the command won't break if the
>environment variable contains a space....
>
>
>- ASB
>
>
>
>-----Original Message-----
>From: Correa, Andre [mailto:[EMAIL PROTECTED]]
>Sent: Thursday, September 06, 2001 1:02 PM
>To: NT System Admin Issues
>Subject: RE: Test Whether Variable Exists
>
>
>I believe that IF DEFINED only works on NT boxes, not 95/98.  If it is
>an all NT environment, then it is OK.  Otherwise, use syntax as
>follows:
>
>If not {%somevar%}=={} echo Variable exists
>
>The { sign can be replaced with quotes, but to each their
>own.  The double =
>is very important, otherwise you will tear out every last strand of
>hair on your head ....
>
>HTH
>
>____________________________________________
>Andre Correa
>Senior Manager/Information Technology
>Lexitron, Inc
>(201) 892-6399
>
> -----Original Message-----
>From:  Torres, Edgar (GEP) [mailto:[EMAIL PROTECTED]]
>Sent:  Thursday, September 06, 2001 12:26 PM
>To:    NT System Admin Issues
>Subject:       RE: Test Whether Variable Exists
>
>if defined MYVAR echo It exists!
>
>______________
>Edgar Torres
>
>
>-----Original Message-----
>From: Simon Butler [mailto:[EMAIL PROTECTED]]
>Sent: Thursday, September 06, 2001 12:22 PM
>To: NT System Admin Issues
>Subject: Test Whether Variable Exists
>
>
>Hi,
>This should be an easy one but I cannot find the answer
>after hours of
>searching. I am looking for a way that I can test whether a variable
>exists and then take action on the result. This is for use
>in a login script - not a KIX script. I don't want to add,
>change or delete
>the variable in anyway, just check whether it is there or
>not. Can anyone
>suggest a way? Thanks, Simon Butler.
>


http://www.sunbelt-software.com/ntsysadmin_list_charter.htm

http://www.sunbelt-software.com/ntsysadmin_list_charter.htm

http://www.sunbelt-software.com/ntsysadmin_list_charter.htm


----------------------------------------------------------------------
The following message has been automatically added by the mail gateway to comply with a Royal & Sun Alliance IT Security requirement:

As this email arrived via the Internet you should be cautious about its origin and content. Replies which contain sensitive information or legal/contractual obligations are particularly vulnerable. In these cases you should not reply unless you are authorised to do so, and adequate encryption is employed.

If you have any questions, please speak to your local desktop support team or IT security contact.
----------------------------------------------------------------------
http://www.sunbelt-software.com/ntsysadmin_list_charter.htm
http://www.sunbelt-software.com/ntsysadmin_list_charter.htm

Reply via email to