Hi There,
I'm familiar with reading in txt files as CSVs, and I'm familiar with using the Directory and Dynamic Input tool to read in multiple CSVs from a folder, but I'm running into challenges attempting to reading in multiple .txt files at once. The data files all have the same fields, are the only files in each folder, and all follow the same naming conversion. They come from the Humanity Mortality Database. I'm attaching a couple of the documents, so that you can see the data format.
Thank you, in advance, for the help!
Solved! Go to Solution.
You can also use a wildcard in the file name to dynamically read in multiple at once. Update the input tool to point to the folder path on your computer where these are held.
After importing everything, I noticed there were extra header lines at the top so I used regex to remove them. I also removed the period placeholders.
This is very helpful. Would you mind letting me know how you're configuring the "File/Field Layout"? I have to reconfigure once I redirect to my folder. Thank you!
Read the file in as a fixed width. From there, just pick a general location of each field.
If this resolves your issue please mark this thread as solved so others can find answers more easily. Thanks!