If you simply wanted to replace strings in a single file, you might create a batch file called ReplStrInAFile.
Lets call it ReplStrInADir.
This batch file just takes a single argument, the directory path. Given that you want to process files not just in a single directory but in numerous specified directories, you would create a third batch file to utilize the other two. Let's call it ReplStrInAllDirs. Once DIRS.TXT is populated, you should be able to run ReplStrInAllDirs. Be sure to watch for wrapped lines in the above batch files.