|I need a bat file to traverse a directory and its subfolders for a specific file name which will be the same in each directory and write the contents of that file along with the folder name to a text file. I have this to write the contents, but because the name is the same it overwrites the contents. I need to write out folder name, and then contents of that file called 'THISFILE' to one text file called 'testfiles.txt'|
FOR /R %%a IN (.) DO COPY "THISFILE" "testfiles.txt"