Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi there
Is it possible to generate a list ex. in a straight table of files from a folder/subfolder on the drive?
If so how can i make this list?
Thanks
/Teis
here the scipt:
for each file in filelist('C:\Temp\*.*')
first 1 load
filename() as File
from '$(file)';
next
Regards
sub ScanFolder(Root)
for each FileExtension in '*'
for each FoundFile in filelist( Root & '\*.' & FileExtension)
FileList:
LOAD '$(FoundFile)' as Name,
Filesize('$(FoundFile)') as Size,
QvdNoOfRecords ('$(FoundFile)') as NoOfRecords,
Filetime('$(FoundFile)') as Time
AUTOGENERATE 1;
next FoundFile
next FileExtension
for each SubDirectory in dirlist( Root & '\*' )
call ScanFolder(SubDirectory)
next SubDirectory
end sub
Call ScanFolder('D:\Qlik Path Name') ;
Replace the Path in the Call function to your install - the output of this will give you a straight table using these dimensions:
Name
Time
Size
NoOfRecords
load
FileName(),
1
from 'c:\temp\*.*';
Yes possible,
have a look at attached zip files.
Regards
ASHFAQ
Hi ASHFAQ,
I downloaded your zip file and stored the script on my QS desktop. I didn't see any section in the script for defining the "root" path, so I ran it anyway but it failed with the error:
No qualified path for the file: ***
at the statement:
FOR Each File in filelist (myRoot&'\*.' &Ext)
so I tried modifying SET myRoot = 'C:\Users\<myUserProfile>\Documents\Qlik\Sense\QDF\DEV\99.Shared_Folders\1.QVD\3.Load\revenue\dims';
but it failed with the same error
Are there some adjustments that I need to make to your "Find My Files" script?
Thanks