Forum Discussion

ThomasWhite's avatar
ThomasWhite
Iron Contributor
Jun 03, 2025

Read line from file 1 scan file 2 for a match batch script

I've two txtfiles.
File1 contains a list of names
File 2 contains the name as in file 1 and 4 other values delimtied by a comma

File 1

Code

Lets say the file one contains

Code:

File2

Code:

The following is the code I'm using

Code:

I get the following output

Code:

Why are the values not being assigned

2 Replies

  • Syamter's avatar
    Syamter
    Iron Contributor

    If your files are large or you want more efficiency, consider using PowerShell or other scripting languages, but this batch script should work for basic needs.