Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
moorematthewj
Contributor II
Contributor II

Load text files from a folder and create source file field

I'm loading multiple text files from a folder. Each text file is named different. 

I want to create a field within the load script that will identify each text file based on the name of the text file. I'm discovering corrupt data within the source files. I need something that will help me filter and zero in on the problems without having to load each text file separately and creating a field that way. 

my load script starts with this:

SUB DoDir (Root)

FOR each File in filelist(Root& '\*.txt')

Any thoughts or tips?

Labels (3)
1 Solution

Accepted Solutions
StarinieriG
Partner - Specialist
Partner - Specialist

Hi,

you could create a field inside the load using FileName()

View solution in original post

2 Replies
StarinieriG
Partner - Specialist
Partner - Specialist

Hi,

you could create a field inside the load using FileName()

moorematthewj
Contributor II
Contributor II
Author

Worked perfectly! Thanks for the help.