post icon

Copy multiple file into a single file using cmd command

The following snippet allow you to copy multiple text files into a single text file.

FOR /f %%i IN ('dir /b C:\PATH_DIR_WITH_MULTIPLE_FILE') DO TYPE C:\DIR_WITH_MULTIPLE_FILE\%%i >> C:\DIR_OUTPUT\UNICO_FILE.TXT 

In practice the snippet execs a ‘dir’ command on the specified path and for each file it appends the text in the output file.

February 18th, 2009 @ 06:40

No comments yet.

Leave a comment

Leave a Reply

Are you human? Time limit is exhausted. Please reload CAPTCHA.