Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hi,
i have a report that pulls in any txt file from a specific file location, parses out the relevant data and then displays it. currently its configured to then store the information into a csv.
however, i now need it to save a csv for each txt file it reads in and to keep the original name.
so in my folder i will have txt file: A, B, C..
do i need to do something like
"for each FolderName in ('\\folder\*.txt')
for each File in filelist (FolderName)
details:
load * from '\\folder\*.txt'
;
Store...? into [csv] (txt);
how do i get Qlik to save a csv for each txt file it reads in and keep the name? do i need to do a loop to grab a txt file one at a time?
any help would be appreciated
thanks
hi @rwunderlich
i have updated the vBasename, for $(vfile) i use a user lower case f so i dont think thats the problem. i think im having an issue with saving them as csvs. when i run it, it saves the csvs as one file with the file name '':
i think this is because its not picking up my vBaseName for some reason?
not sure whats causing the issue here.
thanks again
Look at the log. You are using a name of '' in the Store statement.
1. You don't need the
let vfile = replace....
statement any more. It does nothing for you.
2. Because you spelled it "vfile" in the for each, your
let vBasename = SubField(SubField('$(vfile)', '\', -1), '.', 1);
must spell vfile the same way.
-Rob