PowerShell or VBA or other to parse 30000 txt files, finding a specific number of characters that are then written into a new txt file? RRS feed

  • Question

  • Wondering if a PowerShell, VBA, or other script can parse 30000 of txt files and find all instances of the words "Plat Book" and copy about the 50 characters that follow "Plat Book" into a new txt file capturing only the numbers found in those 50 characters...

    the script's next task would be to name each of these new txt files a combination of the original txt file's name "Deed Book and Page" (e.g. 9542_102.txt) and the parsed Plat Book and Page numbers (e.g. 305_25) that were extracted in the previous step....

    these new created txt files names would be the combination of the Deed Plat Book and Page delimited by a space or - or whatever... e.g. (9542_102-305_25.txt)

    these original tif files (scanned deeds) have been OCRed using Google Drive "open with Google Docs" and then exported to the txt files in question.

    I am a noob to PowerShell, but am a little familiar with Windows Command Line where the last step would be using the  listmyfolder.txt script to copy these 30000 new txt files into 1 txt file to be used in GIS attribute tables.... mating every deed to its corresponding plat(s).

    Sunday, December 22, 2019 5:16 PM

All replies