using wild card in env variable
I have some env variables like
ANSYS009_DIR
ANSYS110_DIR
ANSYS120_DIR
As you can see the difference is the number among them. I want to write a batch file and first check if one of these variables exits. I know that this code will do that for one variable
IF "%ANSYS110_DIR%" == "" GOTO NOPATH
:YESPATH
@ECHO The PATH environment variable was detected.
GOTO END
:NOPATH
@ECHO The PATH environment variable was NOT detected.
GOTO END
:END
However I want to know how can I use wild char?? For example %ANSYS*_DIR% doesn't work.
please share any suggestion on that
June 3rd, 2011 9:29am
For script related questions, please discuss in our Script Center forum.
The Official Scripting Guys Forum
http://social.technet.microsoft.com/Forums/en/ITCG/threads/Please remember to click Mark as Answer on the post that helps you, and to click Unmark as Answer if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
Free Windows Admin Tool Kit Click here and download it now
June 6th, 2011 3:06am