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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
EvanBarrick
Creator
Creator

Extract File Name and Append to Script

Is it possible within a Qlik Sense script to extract part of the file name from a data file and then append that to the table you are loading in?

 

For example, if the file is named, 'Assets-18ABCJAN12.xlsx', would it be possible to only grab the '18ABCJAN12' and add into the table as a new field? 

1 Solution

Accepted Solutions
sunny_talwar
MVP
MVP

You can definitely do this using the FileBaseName function

LOAD Subfield(FileBaseName(), '-', 2) as FileDetails,
   ...
FROM ....;

View solution in original post

1 Reply
sunny_talwar
MVP
MVP

You can definitely do this using the FileBaseName function

LOAD Subfield(FileBaseName(), '-', 2) as FileDetails,
   ...
FROM ....;