Solved

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

  • 25 August 2022
  • 2 replies
  • 11 views

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

icon

Best answer by nielsgerrits 25 August 2022, 04:57

View original

2 replies

Userlevel 6
Badge +32

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.

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

Reply