OR condition in do while.
I want my do while to execute till the time a file is not present after download OR it should execute till my present time < 1 minute. Below is what I did:
Assign Time1Min = Now.Add(1)
I am trying to execute a Do while with below 2 condition:
(Now < Time1Min) OR (Not File.exists(“C:\Temp\abc.csv”))
The loop is continuing till the csv file is not there. I want the loop to end within 1 minute even if the file is not there.
It is just taking the 2nd condition.
Use greater than symbol
Now > Time1Min OR
As I could see the Time1Min has 1 min extra in it
Use a AND condition instead of Or
I think it should be
sorry for typo. I did the same
Is it the case that you are implementing a logic for waiting for downloads?
if yes also have a look wait for download activity
As @Palaniyappan mentioned, And ( or AndAlso) operator should be used because this is condition of continue loop.
(Now < Time1Min) AndAlso (Not File.exists("C:\Temp\abc.csv"))
FYI, if rewrite to condition of exit, it will be OR condition like
(Now > Time1Min) Or (File.exists("C:\Temp\abc.csv"))