Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
am loading all files having same format from folder for that purpose i need to count no files present in folder
is their any way Count files having same format also;;
Thanks in advance
Hi qliklearn,
have a look at the QlikView_functions FILEBASENAME/ FILENAME and FILEEXTENSION and FILEDIR (there are more).
These should enable you to count the nr. of files in a directory that have the same extension.
HTH
Best regards,
DataNibbler
It is perhaps not needed if they have the same name or same extension:
to read all XLS: LOAD .... FROM '*.xls'
You can use also FilelIst (string) to loop over the files and do an explicit loop
Fabrice
check below code to count the files & as well file names.
FOR Each File in FileList('$(vFilePath)')
FileList:
LOAD
'$(File)' as Name,
FileTime( '$(File)' ) as FileTime,
autogenerate 1;
NEXT
Let vCountFileList = NoOfRows('FileList');
check below code to count the files & as well file names.
FOR Each File in FileList('$(vFilePath)')
FileList:
LOAD
'$(File)' as Name,
FileTime( '$(File)' ) as FileTime,
autogenerate 1;
NEXT
Let vCountFileList = NoOfRows('FileList');
plz find Attch ment
SET vpath ='E:\SSIS\multiple\';
SET vFilePath = 'E:\SSIS\multiple\Data1.xlsx';
FOR Each File in FileList('$(vpath)')
FileList:
LOAD
'$(File)' as Name,
FileTime( '$(File)' ) as FileTime,
autogenerate 1;
NEXT
Let vCount = NoOfRows('FileList');
i have done like this please check what is wrong it not counting values
working code ...
SET vpath ='C:\Users\Manoj\excel\*.*';
FOR Each File in FileList('$(vpath)')
FileList:
LOAD
'$(File)' as Name,
FileTime( '$(File)' ) as FileTime
autogenerate 1;
NEXT
Let vCount = NoOfRows('FileList');