Place each of the text files you want to merge in the same folder. Merge a text (.txt) file in the Windows command line (MS-DOS) copy *.csv newfile.csvĪfter the new file is created, open the new CSV file in Microsoft Excel and save it as an Excel file. Type in the following command to merge all CSV files in the folder into a new CSV file titled 'newfile.csv' (any name could be used). How to use the Windows command line (DOS).How to get to an MS-DOS prompt or Windows command line.Type dir to view the files in the folder and ensure all the files are there. Open the Windows command prompt and navigate to the folder containing the CSV files.
For ease, place them in a folder in the root of the C: drive (e.g., c:\csvfiles). In the Save as type drop-down list, select CSV (comma delimited) (*.csv) from the list.ĭo this for each Excel file you want to merge, then place all the CSV files in the same folder. Open the Excel files and in the menu bar, click File, then Save As. To merge Microsoft Excel files together, it is best to save them as CSV files first. If there are multiple files you want to merge at once, you can select multiple files by holding down the Ctrl and selecting each file you want to merge.