Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
evansabres
Specialist
Specialist

Loop Script for .txt files

I have roughly 120 .txt files in a folder, each with three fields,'Name,' 'Male' and 'Female'

I want to load all 120 files into an application.

I have done a loop script for an excel file with multiple sheets, but not for .txt files.

What is the syntax for this script.

Thank you

1 Solution

Accepted Solutions
Anonymous
Not applicable

Something like this.

Load

Name,

Male,

Female

From YourFIlePath\YourFolder\*.txt;

Use the wizard to pull in one and change your From string to end with *.txt

View solution in original post

3 Replies
m_woolf
Master II
Master II

why use a loop?

Load Path\*.txt

.......

evansabres
Specialist
Specialist
Author

What would the structure of the script look like to load all of the files in the folder?

Anonymous
Not applicable

Something like this.

Load

Name,

Male,

Female

From YourFIlePath\YourFolder\*.txt;

Use the wizard to pull in one and change your From string to end with *.txt