New
#1
Using DOs commands to merge txt files by date
I have a bunch of txt files that i want to merge into one file. But instead of A-Z order I want to do it by date, oldest first.
ie:
files/date:
1.txt 1/1/2001
2.txt 1/1/2000
3.txt 1/1/2002
etc
I want the combined file contents to be the contents of 1.txt+3.txt+2.txt,etc This is as far as i've gotten:
dir /B /o : D > %1
copy %1 newfile4.txt
I just need copy to take the variable and it should work. Why is this so hard though? I can't even find a windows 7 program to do this exact thing. I've been working on this for hours please help