Skip to main content
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

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

You can definitely do this using the FileBaseName function

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