Skip to main content
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