Replace characters of a file. dynamically change first few characters of file with equivalent Tid.
Read all the text files in that folder.
I have a text files in a folder like "13_22_pt.csv". 13 is Sid need to get equivalent Tid is 35. Replace the file with Tid "35_22_pt.csv" . If no matching Tid is found replace with 'NA'. Attached excel sheet with example.
From my experience this is not a very safe way to handle file with qlikview. It's the BI tool. This issue i would handle by running some cmd or powershell script.
On the other hand: you can create subdirectory to have store created renamed files. This can be handled with for each loop
for each inFile in FileList('Input/*')
// parse inputfileName according to requirements and name it as outputFileName
, filename() as inputfileName
(txt, codepage is 1250, no labels, delimiter is '\t', msq);
let outputFileName = peek('TmpTable', 0, 'outputFileName');
drop fields inputfileName; // drop every other column you've created to create outputFileName column
store TmpTable into 'Output/$(outputFileName).csv'(txt);
drop table TmpTable;