> For the complete documentation index, see [llms.txt](https://docs.mydbsync.com/cloud-workflow/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.mydbsync.com/cloud-workflow/create-your-workflow/actions/storage/file.md).

# File

## Introduction

The **File** storage action in **DBSync Cloud Workflow** enables you to read, write, move, and rename files from your **local machine or desktop environment**. This action is especially useful for handling structured data formats such as **CSV**, **JSON**, and **XML**, supporting a wide range of data processing and integration workflows.

You can use this feature to:

* Archive files for audit or backup purposes
* Transfer data to a target location for downstream processing
* Rename or organize files as part of automated workflows

Whether you're automating data extraction, preparing reports, or managing file-based integrations, the File Storage action offers the flexibility and control needed to manage files effectively within your integration pipeline.

<figure><img src="/files/imlAv90fVd7jS4e6Y2Fa" alt=""><figcaption></figcaption></figure>

### **Use Cases**

* Archiving transaction data
* Exporting data for manual review

## **Configuration Steps**

{% hint style="info" %}
NOTE: It is necessary to configure the Remote Agent before using the File Storage action.
{% endhint %}

1. **Add File Storage Action to Workflow**

* Drag and drop the File storage action into your workflow.
* Click Configure provided on the File action.
* Click on the Select Agent dropdown and select the agent that you have configured.
* Select the desired operations provided (**READ, WRITE, MOVE/RENAME**).

<figure><img src="/files/YiVAeds43JZVNPpdku3D" alt=""><figcaption><p>Read from a FIle</p></figcaption></figure>

2. **Define Storage Parameters for READ operation**

* **File Path:** Specify the Dropbox folder path where the file should be fetched from (for example, C:/backup/invoices).
* **File Content:** All downloaded files will be stored in a variable. This name is auto generated, however user can also change if needed.\
  This variable will be added to the datastream (Central fx) to process further.&#x20;
* **Preview:** It displays the list of files that you have selected.
* **Properties**
  * **Include files in the sub folder? YES/NO:** Provides the option to read only the parent folder or including subfolders.

<figure><img src="/files/vG3qqICofUhhAh5rMhIa" alt=""><figcaption><p>Write to a File</p></figcaption></figure>

3. **Define Storage Parameters for WRITE operation**

* **File Path:** Specify the Dropbox folder path where the file should be copied (for example, C:/backup/invoices).
* **File Name:** Define the name for the file to be saved. You can use dynamic variables like ***File Name, Local File Path, Download File Path, File Size, Remote File Last Modified Date Time***.
* **File Content:** All downloaded files will be stored in a variable. This name is auto generated, however user can also change if needed.\
  This variable will be added to the datastream (Central fx) to process further.
* **Properties**
  * **Overwrite:** Enable if you want to overwrite files with the same name.
  * **Skip:** Enables you to skip overwriting the file with the same name.
  * **Batch size:** user can select the batch size of 1, 50, 100, 200, 500 from the dropdown.
  * **Create Sub folder:** Enable the checkbox to add a static name or drop any variable from the data stream to name dynamically. Or it can be a combination of both.

<figure><img src="/files/lsyEd6oFJL4db2bb5lOj" alt=""><figcaption><p>MOVE/RENAME operation</p></figcaption></figure>

4. **Define Storage Parameters for MOVE/RENAME operation**

This operation is provided for you to move the data from one file path to another. You can also rename it while moving.

* **Source File Path:** Choose a file from the drop down list OR input a regular expression for a customized and dynamic pattern.
* **Destination File Path:** Choose a file from the drop down list OR input a regular expression for a customized and dynamic pattern.

### **Best Practices**

* Use consistent naming conventions to keep files organized.
* Leverage timestamp placeholders for versioning.
* Secure credentials when using external storage locations.
* Validate output by enabling logging or audit trails.

### **Limitations**

* File size limits may apply depending on the chosen storage.
* Format conversion should be handled explicitly in data preparation steps.
