Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
andreasignori
Contributor
Contributor

tFileList to loop in all subfolder? Is it possible?

Hi guys

I'm trying to get every single file inside all my subfolder. Es

I have my "main" folder at path:

\\192.168.1.1\\FolderWithFoldersInside\\

Inside this folder i have 4 folders like:

folder1

folder2

folder3

folder4

And inside every folderX i have 0...n .txt files, and i need to get all of them.

I would like to make a job to access all files and i'm 100% sure i'm gonna do it with tFileList.

I tried to use 2 tFileList

0695b00000H83oDAAR.png 

and the second one

0695b00000H83p1AAB.png 

(Inside tJava_1 there's only System.out.println((String)globalMap.get("tFileList_2_CURRENT_FILE"));)

 

It always gives me no result so i'm probably doing something wrong (btw i couldn't find any example on how to use tFileList and get folders and stuff)

Labels (2)
1 Solution

Accepted Solutions
gjeremy1617088143

Hi,

Directory :the path of your main directory

just use 1 tfilelist

with FileListType : FIles

include subdirectories checked

case sensitive : no

use Glob expressions as Filemask checked

global expresssion "*.txt"

iterate on a tjava

in the tjava

System.out.println((String)globalMap.get("tFileList_1_CURRENT_FILEPATH"));

 

Send me love and kudos

 

View solution in original post

1 Reply
gjeremy1617088143

Hi,

Directory :the path of your main directory

just use 1 tfilelist

with FileListType : FIles

include subdirectories checked

case sensitive : no

use Glob expressions as Filemask checked

global expresssion "*.txt"

iterate on a tjava

in the tjava

System.out.println((String)globalMap.get("tFileList_1_CURRENT_FILEPATH"));

 

Send me love and kudos