Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Help with File Functions

[View:http://community.qlik.com/cfs-file.ashx/__key/CommunityServer.Components.UserFiles/00.00.02.89.41/Files-in-Folder.qvw]

Hi Guys,

Please see the attached qvw. I am trying to use the "File functions", but getting null values.

I am inspecting the files into ''C:\Temp'' (at the end of the script).

What should I change in order to make it work?

Thanks in advance,

Aldo.

2 Replies
manishkumar75
Partner - Creator II
Partner - Creator II

Hi, I have seen ur code. Please change the following peice of code

//Set the Directory to inspect, and Call the function
Set myDir = 'C:\Temp';
Call Dodir('$(myDir)');

with

//Set the Directory to inspect, and Call the function
Set myDir = 'C:\Temp';
Call Dodir(myDir);

Also, declare the variable Root.

Regards,

Manish

Not applicable
Author

Hi Manish,

I tried, but still something is missing. I get null results.

Below the script.

Thanks in advance,

Aldo.

sub DoDir (Root)

for each Ext in '*.*'

for each File in filelist (Root&'\*.'&Ext)

Load

FileName('$(File)') as FileNameOrig,

FileExtension('$(File)') as FileExtensionOrig

autogenerate 1;

next File

next Ext

for each Dir in dirlist (Root&'\*')

call DoDir (Dir)

next Dir

end sub

call DoDir('C:\Temp')