0

I have thousands of txt files that are actually in JSON format. Each file has the same string, with different values, namely:

"Name":"xxx","Email":"yyy@zzz.com"

I want to extract the values of these two strings from all the txt files that I put in the same folder.

I've found these lines of code: Extract part of a text file using Windows batch but it only applies to one txt file. Whereas what I need is, it can execute all files in one folder.

Saif
  • 1

1 Answers1

0

You can use the FORFILES command, to loop through each file,

Syntax FORFILES [/p Path] [/m SrchMask] [/s] [/c Command] [/d [+ | -] {date | dd}]

From the following webpage,

https://ss64.com/nt/forfiles.html

Shaqil Ismail
  • 1,794
  • 1
  • 4
  • 5