# Batch Files

## **Merge multiple files into a single file**

1\. Go to the **Resources** page and click the **Add Resource** button.

2\. In the "Select a data source" step, navigate to **Flat File > Batch Files**.

![](/files/-MiNl8XPhBdIf11R1qCP)

3\. Click **Select Files** to upload your files. Here you can upload a bunch of files at a time. There is no limit for the number of rows to upload. Before uploading files, please note that:

* All data files should have the same schema (the same number of columns and the same data type for each column). However, the column names can be different.
* Currently, **Batch Files** only supports .csv, .tsv, and .txt files. If you want to upload Excel (.xlsx) files, please choose **Single File** instead in Step 2.&#x20;
* The maximum number of files you can upload at a time is up to 100 files.

![](/files/-MiNnt7a7EZOn8uSryUc)

4\. Then, in **CSV Preview Setup**, you can preview the first file. In this step, you can change the resource name or check if your file is parsed into the correct format. If your file doesn't have column names, you can switch to **Safe mode** to add a header row.&#x20;

![](/files/-MiNsuBKGXXBQhfJCXjV)

{% hint style="warning" %}
If all files don't have a header row and you don't add a header row in **CSV Preview Setup**, all files lose the first row. This is because the system will consider the first row as a header row automatically.
{% endhint %}

5\. Click **Upload** and you will see the files are uploading in the bottom-right window. It may take a few minutes to several hours to upload all data files depending on the data size and the number of your files.

6\. Once your **Batch Files** resource is built up, you can click the resource to enter into **File Management**. It shows the list of files that you just uploaded and their detailed information for each file. Here you can also [add new files](#add-new-files) or [delete some of the files](#delete-files).

![](/files/-MiO1esa58l8wjJFLHvn)

## **Manage files in Batch Files**

Once you build up a Batch Files resource, you can go to **File Management** to add or delete files by clicking the dropdown menu next to your **Batch Files** resource.

![](/files/-MiO0z5zAmj4DtF4cy_r)

### Add new files

If you have new files and want to merge them into your current Batch Files, you can just click **Add Files** and choose data files to upload. Remember the new files should have the same schema as the one in the other files.

![](/files/-MiO3l7nmSZP84wk6Xdv)

### **Delete files**

In **File Management**, you can also delete some of the files in your Batch Files. Just navigate to the file that you want to delete and click the **Delete** button. &#x20;

![](/files/-MiO5tPcctZ6yId8nS43)

## Update your table

If you add or delete files in your Batch Files resource, you can go to your project to retrieve the latest records without rebuilding your data pipeline.

![](/files/-MiOCE6pB51YF6jm3cuj)

## Acho Meta Name

When you create a Batch Files Resource and import data to a project, you will find a new column called `_acho_meta_name` that doesn't exist in your dataset. This column is generated automatically when you upload files as a Batch Files. This can help you identify which rows originated from which data files and when these files are imported.

![](/files/gD3R2JjGL5eD7vDZ6FVE)

If you want to extract information from this column, you can use the [Split](/acho-studio/data-prep-projects/applying-actions/data-cleaning/split.md) action to separate this column or write a [regular expression](https://docs.acho.io/supported-math-functions-in-formula/string-functions#regexp_extract) to extract a specific string in [Formula](/acho-studio/data-prep-projects/applying-actions/tools/formula.md).&#x20;

## Troubleshooting

### 1. Some of the rows disappear when I use Batch Files to upload files.

This problem may happen when some of your data files don't have a header. If you face this situation, please follow the steps below to reupload your data:

#### Situation 1: All data files don't have a header

1. Go to **Resource** and choose **Batch** Files to upload your files again.
2. In **Data Preview Setup**, turn on the **Safe Mode**.
3. Click **Add a Header Row**.
4. Now, the system will add a header for all of your data files automatically.&#x20;

![](/files/hAaJiIN5Zo54qEFd5khp)

#### Situation 2: Some of the data files don't have a header

There are two options to tackle this situation:

* Option 1: Open the files consisting of headers, and remove their headers. Then, follow the steps in Situation 1 to re-upload these files.
* Option 2: If you are not sure which files have headers and which ones don't, you can follow the steps in Situation 1 to re-upload files and add a header row (no matter whether a header already exists in **Data Preview Setup**). Then, import the Batch Files to a project and use **Filter** to filter out the header rows.

![](/files/0Fap9JQK1tFF8z5E7Dyt)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.acho.io/acho-studio/resources/import-data/upload-batch-csv.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
