Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi everyone.
I am looking for some help to write a simple loop in my script which confirms a QVD has the latest date stamp (QVDCreateTime) before the script exits.
I have the following which checks the date stamp
let vQVDPath = 'C:\Users\USER1\Desktop\';
let vToday = date(today(),'DD/MM/YYYY');
if left(date(QvdCreateTime('$(vQVDPath)TestQVD.QVD'),'DD/MM/YYYY'),10) = '$(vToday)' then
SET vResult = 'Yes';
ELSE
SET vResult = 'No';
ENDIF;
What i want to do now is wrap a loop around it so it keeps looping until the condition is met.
Can anyone help please?
Hi Kush,
Is there an easy way to add another condition into this script. What i am thinking is, if the reload takes more than 1 hour then exit script. I am concerned that if something happens and the file copy hangs then the script will carry on looping until someone stops it. But we will not know straight away if that happens as the task will still be running.
Yes. You can put condition to limit it to loop for one hour from when it got started. But if still condition is not met then do you need to fail the app? Because if you just do exit script it will show successful in task.