Hi,
I have created a batch files to search for files from an external list.txt. But now I want to generate a list.txt from all the files that are in a directory and subdirectories but without the path.
I have figured out something like this:
DIR (MYPATH) /B/S/A:-D>list.txt
But I get this:
C:Blablagagachachafile.sql
C:Blablagagafoldercode.sql
…
And I would want just:
file.sql
code.sql
…
or even better:
file.sql,code.slq,…
The purpose of this batch is to search if files from a specified directory exist in another one.
Thanks for any help,
Julien
Doing it with dir could be a bit of a pain. Using the for /r command and for variable substitution makes it easy.