
Creator
2018-12-28
02:48 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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,923 Views
1 Solution
Accepted Solutions

MVP
2018-12-28
02:58 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You can definitely do this using the FileBaseName function
LOAD Subfield(FileBaseName(), '-', 2) as FileDetails, ... FROM ....;
1 Reply

MVP
2018-12-28
02:58 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You can definitely do this using the FileBaseName function
LOAD Subfield(FileBaseName(), '-', 2) as FileDetails, ... FROM ....;
