How To Merge CSV Files into Single File


If you have multiple CSV files and want to combine them into one, you know it’s not easy to merge them manually, one by one.

In this post, I’ll show you how to merge CSV files into a single CSV file using the command line. With just a few simple commands, you can merge CSV files quickly and efficiently, without the need for any third-party solution.

CSV Files in One Folder

The first thing you have to do is to save all files into one folder. Make sure you don’t have any files that you don’t want to merge into one CSV:

Start Command Prompt

There are two possible ways to run the command line.

The first one is to press Win + R on your keyboard, type cmd, and then press Enter or click on OK:


The second one is to use Windows Search and also type cmd. After that, click on Command Prompt:

Navigate to the Folder that contains your CSV Files

The next step is to navigate to the folder where you saved the CSV files you want to merge. In Command Prompt, you will use the cd (change directory) command to move into the correct folder. In my case it’s on C: drive, folder \MergeCSV, so I will type in the following command:

cd C:\MergeCSV

Your screen will look something like this:

After you press Enter, you will be inside the folder containing the CSV files you want to merge:

In order to merge all the CSV files into one file, you have to run the following command:

copy *.csv merge.csv

Here is how it will look on the screen:

This means that the system will take all the files that have .csv in their filename, and merge them into one file called merge.csv.

After you press Enter, you will get something like the following screen:

This is a confirmation that the merging process has finished.

Finally, you will see the new file containing all the data from the original files:

By using Command Prompt, you can quickly merge multiple CSV files into one without relying on external software or cloud-based solutions.


Tags:, ,

Add a Comment

Your email address will not be published. Required fields are marked *