Skip to main content
Solved

Read multiple text files and extract 1 date string from each one of them


Hi everyone, I know how to read just 1 text file and use StringSearcher to extract string from the content. But how do I read "multiple" text files "automatically" and extract specific string from the content in each one of them?

 

Thanks in advance

Howard

Best answer by nielsgerrits

Multiple ways to do this.

 

My preferred method is to use a FeatureReader (Directory and File Pathnames) to find the files I need followed by another FeatureReader (Text File), using the path_windows attribute to read the selected files.

 

As an alternative you can add a classic Text File reader and choose for the "Select Multiple Folders/Files..." option from the Dataset options.

View original
Did this help you find an answer to your question?

2 replies

nielsgerrits
VIP
Forum|alt.badge.img+54
  • Best Answer
  • August 25, 2022

Multiple ways to do this.

 

My preferred method is to use a FeatureReader (Directory and File Pathnames) to find the files I need followed by another FeatureReader (Text File), using the path_windows attribute to read the selected files.

 

As an alternative you can add a classic Text File reader and choose for the "Select Multiple Folders/Files..." option from the Dataset options.


  • Author
  • August 25, 2022

Thanks for that. FeatureReader works for me. Now I am able to read thousands of txt files by using FeatureReader 👍 Much appreciated!


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings