giovedì 1 luglio 2010

Join multiple files [ENG]

Do you always forget how to join multiple files in DOS? Example: multiple .log files into an aggregate.txt file

Method #1: command line copy
copy /a *.log aggregate.txt
Method #2: command line for loop
for %f in (*.log) do type "%f" >> aggregate.txt
Method #3: batch loop (note the double %)
for %%f in (*.log) do type "%%f" >> aggregate.txt

Thanks to HowToGeek!

Nessun commento: