# 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.

## Use Cases

* Archiving transaction data
* Exporting data for manual review

## Configuration Steps

NOTE: Ensure that you configure the Remote Agent before using the File Storage action.

#### Add File Storage Action to Workflow

1. Drag and drop the **File** storage action into your workflow.
2. Click **Configure** on the File action.
3. Select the agent that you have configured in the **Select Agent** dropdown.
4. Select the required **Operation** (*Read*, *Write*, *Move/Rename*).

#### Define Storage Parameters for Different Operations

Based on whether you select *Read,* *Write*, *Move/Rename,* define storage parameters in the following ways:

1. **Define Storage Parameters for Read Operation**

   1. **Read From (File/Folder Path):** Choose a folder or file from the list OR input a regular expression for a customized and dynamic pattern. (for example, *C:/backup/invoices*).
   2. **File Content:** All downloaded files will be stored in a variable. Though the name is auto generated, you can change it, if needed.

   This variable will be added to the datastream (Central fx) to process further.

* **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="https://1036205596-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fv9avy716UiAsS24zOznZ%2Fuploads%2FxtHbMl4Jx5IV7sIdhBs7%2Funknown.png?alt=media&#x26;token=40ccf392-a53c-4e83-ae55-87af76d9e4c3" alt=""><figcaption></figcaption></figure>

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

* **Write to ( File/ Folder Path)**: Choose a folder or file from the list OR input a regular expression for a customized and dynamic pattern. (for example, C:/backup/invoices).

<figure><img src="https://1036205596-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fv9avy716UiAsS24zOznZ%2Fuploads%2Ff2j6fJP6fjw8zPmKYuNu%2Funknown.jpeg?alt=media&#x26;token=4d5c2c25-b6f5-4f39-9863-793b1c9b2ffb" alt=""><figcaption></figcaption></figure>

* **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. Though the name is auto generated, you can change it, if needed.
* This variable will be added to the datastream (Central fx) to process further.
* **Properties**
* **If File Name Exists:**
  * **Overwrite**: Select to overwrite files with the same name.
  * **Skip**: Select to overwrite 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**: Click the checkbox to add a static name.

<figure><img src="https://1036205596-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fv9avy716UiAsS24zOznZ%2Fuploads%2FqxbNUIf2Kdw1O0VYBBcO%2Funknown.png?alt=media&#x26;token=9b3760f9-3b28-478a-8909-3b1ab02d0416" alt=""><figcaption><p>Write to File</p></figcaption></figure>

3. **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.

  <figure><img src="https://1036205596-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fv9avy716UiAsS24zOznZ%2Fuploads%2FKcgtAvN69EuhP4hLxHsT%2Funknown.jpeg?alt=media&#x26;token=4ba9c12a-a02c-4996-b36c-3bf816fb567c" alt=""><figcaption><p>Move/Rename Operation</p></figcaption></figure>

## 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.


---

# 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.mydbsync.com/cloud-workflow/2026_create-your-workflow/action/storage-actions/file.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.
