Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
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.
i/p : 13_22_pt.csv o/p: 35_22_pt.csv
Hi.
If you want to rename name of the file check https://help.qlik.com/en-US/qlikview/April2020/Subsystems/Client/Content/QV_QlikView/Scripting/Scrip...
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/*')
TmpTable:
load
*
// parse inputfileName according to requirements and name it as outputFileName
;
LOAD *
, filename() as inputfileName
FROM
[$(inFile)]
(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;
next inFile;