It's all about the answers!

Ask a question

Using Conditional step


Erick Mory (5186) | asked Aug 17 '11, 1:14 p.m.
As should be the syntax for a conditional step to tell the following:

condition:
IF EXIST %PRO%\Exxxxx

command:
.set env HelloWorldEnvironment "Dia = %date:~0,2%"
.set env HelloWorldEnvironment "Mes = %date:~3,2%"
.set env HelloWorldEnvironment "Anio = %date:~6,4%"
.set env HelloWorldEnvironment "NombreCarpeta = %Dia%-%Mes%-%Anio%"
mkdir %RES%\%NombreCarpeta%-Exxxxx

command else:
.set env HelloWorldEnvironment "ExisteCarpeta = false"

One answer



permanent link
Brent Ulbricht (2.5k11) | answered Aug 18 '11, 2:58 p.m.
JAZZ DEVELOPER
As should be the syntax for a conditional step to tell the following:

condition:
IF EXIST %PRO%\Exxxxx

command:
.set env HelloWorldEnvironment "Dia = %date:~0,2%"
.set env HelloWorldEnvironment "Mes = %date:~3,2%"
.set env HelloWorldEnvironment "Anio = %date:~6,4%"
.set env HelloWorldEnvironment "NombreCarpeta = %Dia%-%Mes%-%Anio%"
mkdir %RES%\%NombreCarpeta%-Exxxxx

command else:
.set env HelloWorldEnvironment "ExisteCarpeta = false"


Hi,

You might give something like this a try in the 'Conditional' text field.

`IF EXIST %PRO%\Exxxxx. (exit 0.) else (exit 1.)`

It's important to have the statement within the backticks (`OS command`).

Brent Ulbricht
RTC Build Lead

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.