[Batch] Search multiple folders for string in file
Solved
Ptitgrand
Posted messages
13
Status
Member
-
Ptitgrand Posted messages 13 Status Member -
Ptitgrand Posted messages 13 Status Member -
Hello,
I would like to know if you could help me.
The goal of my program is to retrieve image files present in a folder whose name I don't know.
In this folder, there is a file that contains a string allowing me to find the right folder among several directories.
I am looking to design a small program that could search in different folders (with random names) for a "txt" file that contains a string (TOTO), and then I would like to retrieve the path that leads to the file.
Example:
Here are the different files:
C:\Test\ABC005\ex.txt (Contains line 25: abv)
C:\Test\ABC001\xe.txt (Contains line 25: abn)
C:\Test\ABC008\ab.txt (Contains line 25: TOTO)
I would like to run the program in batch to retrieve the path "C:\Test\ABC008" so that I can later copy the images to another directory.
Best regards,
DUBOIS Nicolas
I would like to know if you could help me.
The goal of my program is to retrieve image files present in a folder whose name I don't know.
In this folder, there is a file that contains a string allowing me to find the right folder among several directories.
I am looking to design a small program that could search in different folders (with random names) for a "txt" file that contains a string (TOTO), and then I would like to retrieve the path that leads to the file.
Example:
Here are the different files:
C:\Test\ABC005\ex.txt (Contains line 25: abv)
C:\Test\ABC001\xe.txt (Contains line 25: abn)
C:\Test\ABC008\ab.txt (Contains line 25: TOTO)
I would like to run the program in batch to retrieve the path "C:\Test\ABC008" so that I can later copy the images to another directory.
Best regards,
DUBOIS Nicolas