It's all about the answers!

Ask a question

Rational Build Forge Step Condition validating existed File


Sergio González (355) | asked Jun 18 '13, 12:20 p.m.
 Hello, 

    I want to configure a conditional step validating if a file exists or not in a Windows Server in RBF 7.1.3.5.
    For that I found this article, but I tried this instructions and it is not working: https://jazz.net/forum/questions/61649/using-conditional-step

   In my case I am setting:
Condition: 
     `if exist E:\RBFtmp\Promocion$B\List$B.txt`

Command: 
    .set env Entorno_RTC "FILE=YES"

Command ELSE:
   .set env Entorno_RTC "FILE=NO"

And I received everytime: " The syntax is not correct.", and I tried using different alternatives as: 
 `exist E:\RBFtmp\Promocion$B\List$B.txt` 
without quotes:
if exist E:\RBFtmp\Promocion$B\List$B.txt or  exist E:\RBFtmp\Promocion$B\List$B.txt
even:
true ( `if exist E:\RBFtmp\Promocion$B\List$B.txt`)

But always with the same result.

Can you help me?, How can validate if the file exists in condition instruction in my Windows server?

Thank you a lot.


One answer



permanent link
Sergio González (355) | answered Jun 19 '13, 2:38 a.m.
 ¡¡Unbelievable!!, By error, testing the different possibilities I was thinking, I found the way. 
 Using:

`if exist exist E:\RBFtmp\Promocion$B\List$B.txt` 

with double exist, in windows works. I do not know why but..... It works for my.


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.