I have three folders, two with text files in.
Empty (to copy merged files to)
Items in Folder2 contain the most recent data
Items in Folder1 contain the new data
I want to merge the files from Folder1 and
Folder2 together and output the same file
names of text1.txt text2.txt and text3.txt to
So far I have this, but it doesn't work correctly
and I need a hand with the syntax / coding if
for %%F in ("C:\test\Folder1\*.txt") do copy
%%F +"C:\test\Folder2\*.txt" MrgFiles
Basically I've cut out all the @echo and pause commands, and some of the other set vars I did which didn't work. I could go through and setup each file hardcoded, but there are lots of them, so want to be able to say;
for every .txt file in <location>, merge it with this <location> with files of the same name, and output the result <here>
Does that make sense? I'm new to coding and I think I at least understand what I'm after, but cannot fathom the syntax for it.
Regards and many thanks