Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
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')