I have a batch that's merging some files into one file called all.txt
. The batch code is OK, but what I want is to concatenate the file contents in numerical order. Currently the command will start merging files in this order.
1.txt
2.txt
3.txt
100,001.txt
3000.txt
What I want is merge 001.txt
to 100,001.txt
in numerical order:
1.txt
2.txt
3.txt
3000.txt
100,001.txt
This is my current code:
(for /f "delims=" %%a in ('dir /b /a-d *.txt') do (
type "%%~a"
echo(
)
)>all.txt