Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I want a piece of script that will set a variable to '1' if files exist in a location. then if the variable is '1' i want run that particular piece of script. if not i want to skip it.
I basically want to check that the files in the location are great than 0.
The location will hold several QVD's with the same name and the date on the end.
e.g.
Location= C:\QV
Sales012013.qvd
Sales022013.qvd
Sales032013.qvd
So if Sales*.qvd>0 then run script.
Can anyone help?>
Try maybe something similar to what Henric suggested here:
Hi,
Try this script
SET vFileName='Refund.qvd';
// Set a variable indicating if the file exists or not. -1 is True, 0 is False
LET vFileExists = if(FileSize('$(vFileName)') > 0, -1, 0);
IF $(vFileExists) THEN
Data:
LOAD *
FROM $(vFileName);
ELSE
MsgBox("File Not exists.");
END IF;
Hope this helps you.
Regards,
Jagan.