Using wildcard file name matching in epadmin command-line parameters on Windows

Using wildcard file name matching in epadmin command-line parameters on Windows

book

Article ID: KB0080262

calendar_today

Updated On:

Products Versions
TIBCO Streaming -

Description

The command:
epadmin install node nodename=OPS.VT.%NODE_SB% application=%MYWORKSPACE%\sb\OPS.Application-*-SNAPSHOT-ep-application.zip 
  substitutionfile=%MYWORKSPACE%\scripts\%ENV%\sb\%NODE_SB%\engine.conf
does not expand the asterisk wildcard symbol, '*', in the 'application=' setting. 

Issue/Introduction

MS Windows command line example

Resolution

The example command fails because the Windows CMD shell does not recognize the parameter value as a filename because of the equals sign, '=', before it.

The alternatives are:

A) Use the epadmin command syntax without the equals sign, as so (using --parameter <value> syntax):
epadmin install node --nodename OPS.VT.%NODE_SB% --application %MYWORKSPACE%\sb\OPS.Application-*-SNAPSHOT-ep-application.zip 
  --substitutionfile %MYWORKSPACE%\scripts\%ENV%\sb\%NODE_SB%\engine.conf


B) Place the wildcard result in an environment variable and reference the environment variable in the epadmin command, as so:

dir /B %MYWORKSPACE%\sb\OPS.Application-*-SNAPSHOT-ep-application.zip >__dir.tmp
set /p FNAME=<__dir.tmp
epadmin install node nodename=OPS.VT.%NODE_SB% application=%MYWORKSPACE%\sb\%FNAME% substitutionfile=%MYWORKSPACE%\scripts\%ENV%\sb\%NODE_SB%\newengine.conf