I have 6500 '.txt' files in a directory. The name of all files begin with the Unique ID, example below.
101101_ABCD.txt
101102_ABCD.txt
101103_ABCD.txt
All these files have a text 'Success' or 'Failure' or any other character.
I want to copy the file name and its corresponding content in one file.
I have tried below command but, it gives only content.
copy *.txt New_File.txt
The above command gives below result in the New_File.txt
Success
Failure
Success
whereas I am looking for below result in New_File.txt
101101_ABCD.txt Success
101102_ABCD.txt Failure
101103_ABCD.txt Success