Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
soha1902
Creator
Creator

How to fetch file name?


Hello everyone,

I want to load file name in my QV app.

for example: I am having below URL list in excel.

URL

\\abc.com\project\docs\cs\one.xlsx

\\abc.com\prjocts\docs\cs\it\two.xlsx

\\abc.com\prjocts\cs\it\three.xlsx

Now I want to load only last name in my app like below

URL

one.xlsx

two.xlsx

three.xlsx

Please help.

1 Solution

Accepted Solutions
its_anandrjs
Champion III
Champion III

Try Like

LOAD URL, SubField(URL,'\',-1) AS NewUrl

LOAD * Inline

[

URL

\\abc.com\project\docs\cs\one.xlsx
\\abc.com\prjocts\docs\cs\it\two.xlsx
\\abc.com\prjocts\cs\it\three.xlsx

];

View solution in original post

4 Replies
its_anandrjs
Champion III
Champion III

Use subfield function

its_anandrjs
Champion III
Champion III

Try Like

LOAD URL, SubField(URL,'\',-1) AS NewUrl

LOAD * Inline

[

URL

\\abc.com\project\docs\cs\one.xlsx
\\abc.com\prjocts\docs\cs\it\two.xlsx
\\abc.com\prjocts\cs\it\three.xlsx

];

Not applicable

Hi soha,

You need to use FileBaseName() for this in script level like,

FileBaseName() as BaseName

amit_saini
Master III
Master III

Hi Soha,

Like this??? Please see the attachment.

Thanks,

AS