I hope you are all fine today.
I have multiple text files, each containing lists similar to the example shown below:
96467,296466,3 93015,1 4466,1 90721,1 96239,1 96241,1 93024,1Previously, I merged these lists into a single text file using the command:
copy *.txt merged_file.txt
Now, I want to enhance this process by appending the names of the respective text files next to each item when copying them to the merged file. The desired output format should have each item followed by the name of the file it originated from, separated by a hash sign (#). For clarity, the format should look like this:
96467,2#19.txt 96466,3#19.txt 93015,1#19.txt 4466,1#19.txt 90721,1#KAfa.txt 96239,1#KAfa.txt 96241,1#KAfa.txt 93024,1#KAfa.txt93022,1#Tall.txtI'd appreciate any assistance in achieving this through a command-line script on a Windows machine.