Skip to main content
Announcements
Introducing a new Enhanced File Management feature in Qlik Cloud! GET THE DETAILS!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Filesize() not working for URL Path

Hi All,

I am trying to find out the size of a file that is present in a web shared location.

I have used function as below. it is not fetching anything. it is returning null.

Let vSize= FileSize('http://rss.nytimes.com/services/xml/rss/nyt/Science.xml');

but if i use a local drive path of any file instead of URL path, it is working fine.

Any  suggestions and references to understand and debug the issue will be very helpful.

Thanks in Advance.

Sunil.

4 Replies
Anil_Babu_Samineni

Sunil,

For me this is working. Would you check the Host file is working or not

SET vFilePath = 'C:\Users\xxx\Downloads\DDQ.qvw';

Let vSize= Alt(FileSize('$(vFilePath)'),0);

Then, I've created Text object with the Value of =$(vSize)

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
jonathandienst
Partner - Champion III
Partner - Champion III

The FileSize function expects a Windows file path - it does not work on a URL.

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Not applicable
Author

Anil,

Thanks for your response.

In my example above, if you click on the link it not working. but copy the URL paste it in URL bar. it opens the XML file.

I have tried with a local drive path.

Let vSize= FileSize('D:\S h.Sunilkumar\Work Area\Temp.xlsx'); It is working fine.

but I need to find the size of a file present in a web shared location, for which I need to specify an URL of the file like the example mentioned above. This seems to be not working.

Not applicable
Author

Hi Jonathan,

Thanks for your Response.

In the Qlikview help site, it is mentioned that both Windows path and URL address are valid to use in filesize().

PFB the link.

https://help.qlik.com/en-US/qlikview/12.0/Subsystems/Client/Content/Scripting/FileFunctions/FileSize...

Is this an issue with the function itself that Filesize() is not  accepting any URL paths?

Sunil.