Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Is it possible to have QlikView search a directory (C:\myfolder) and return list of all the file names in that folder? All of the files are .txt files.
Thanks,
Thanks for all the replies. I was able to get it to work found this script
set vRoot = 'C:\myfolder';
FOR Each Ext in 'txt'
FOR Each File in filelist ('$(vRoot)'&'\*.'&Ext)
Load '$(File)' as Name, FileSize( '$(File)' ) as
Size, FileTime( '$(File)' ) as FileTime
autogenerate 1;
next File
next Ext
Load filebasename()
from c:\myfolder\*.txt;
I use this in my script:
// ================ Get TXTfiles ==========================
SUB DoDir (Root)
LET vFirstLoop=1;
Let FileMask= Root &'\*.txt;
FOR Each File in filelist (FileMask);
FileList:
LOAD
'$(File)' as Name,
FileSize( '$(File)' ) as Size,
FileTime( '$(File)' ) as FileTime
autogenerate 1;
NEXT File
ENDSUB
// ====================================================
CALL DoDir (MyPath);
Thanks for all the replies. I was able to get it to work found this script
set vRoot = 'C:\myfolder';
FOR Each Ext in 'txt'
FOR Each File in filelist ('$(vRoot)'&'\*.'&Ext)
Load '$(File)' as Name, FileSize( '$(File)' ) as
Size, FileTime( '$(File)' ) as FileTime
autogenerate 1;
next File
next Ext
Hi, is there any way to specify multiple file extension.
if i have excel and text file in the same folder, how we will load it.
and also how to load the files which are available in sub folder.
thanks