Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Query on FileSize

Hi,

I want to check the size of the file, if it is greater than 100 MB then script should stop and if it is less than that limit than the other steps need to be trigger.

BELOW ERROR MESSAGE I AM GETTING:

********************************************

Script line error:

if (FileSize(C:\Users\Desktop\14th Apr 2017\Test14AprQVD.qvd)> 100000000))

*********************************************

My actual script is :

if (FileSize(C:\Users\ROKY\Desktop\6th Apr 2017\Main data Alliance\Alliance14AprQVD.qvd)> 100000000)

EXIT Script;

ENDIF

if (FileSize(C:\Users\ROKY\Desktop\6th Apr 2017\Main data Alliance\Alliance14AprQVD.qvd)< 100000000)

Do the rest of the step processing

Please help in this issue.

Thanks,

Rohit

4 Replies
Anil_Babu_Samineni

If condition required two parameters like If(Sales >0, 1)

From your script, It showing one parameter called Filesize. What you want to do with this

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
Anonymous
Not applicable
Author

Try this

if (FileSize(C:\Users\ROKY\Desktop\6th Apr 2017\Main data Alliance\Alliance14AprQVD.qvd)> 100000000)  then

EXIT Script;

ENDIF

krishnacbe
Partner - Specialist III
Partner - Specialist III

Hi,

Try below expression

if (FileSize('C:\Users\Desktop\14th Apr 2017\Test14AprQVD.qvd')> 100000000))

Peter_Cammaert
Partner - Champion III
Partner - Champion III

Indeed, the actual file name should be specified as a string, so put it between single quotes.