# Files

| Module          | Type                        | Description                                                                                                                                                            |
| --------------- | --------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| CSVDatabase     | CloseSource                 | Closes the specified source connection                                                                                                                                 |
|                 | CloseTarget                 | Closes the specified target connection                                                                                                                                 |
|                 | DeleteRecord                | Deletes the specified target record                                                                                                                                    |
|                 | ExecuteStatements           | Executes custom SQL statements on a connection                                                                                                                         |
|                 | GetNextRecord               | Fetches the next record from the specified source connection                                                                                                           |
|                 | InitializeSource            | Initializes a connection for reading data records at run time.                                                                                                         |
|                 | InitializeTarget            | Initializes a connection where output records will be saved.                                                                                                           |
|                 | LookupRecord                | Fetches a specific record from a source connection                                                                                                                     |
|                 | MapRecordFields             | Sets the values of the specified DataFields in a target connection                                                                                                     |
|                 | SaveRecord                  | Saves the specified target record                                                                                                                                      |
| DelimitedFile   | AppendFile                  | Appends the contents of one file to another                                                                                                                            |
|                 | CloseSourceFile             | Closes the specified Source data source                                                                                                                                |
|                 | CloseTargetFile             | Closes the specified target delimited file                                                                                                                             |
|                 | CopyFileRecords             | Copies specific records from one file to another                                                                                                                       |
|                 | CreateFileFromSource        | Creates a delimited file from a Source                                                                                                                                 |
|                 | DeleteFile                  | Deletes the specified file                                                                                                                                             |
|                 | GetNextFileRecord           | Fetches the next record from the specified delimited Source file                                                                                                       |
|                 | InitializeSourceFile        | Initializes a Source for reading data records from a delimited file                                                                                                    |
|                 | InitializeTargetFile        | Initializes a Target for writing data records to a delimited file                                                                                                      |
|                 | MapRecordFields             | Sets the values of the specified DataFields in a target delimited file                                                                                                 |
|                 | SaveValueInNewFile          | Saves a field value to a file                                                                                                                                          |
|                 | SplitFile                   | Splits a large delimited file into multiple files                                                                                                                      |
|                 | WriteTargetFileRecord       | Inserts a record into the specified delimited file                                                                                                                     |
| FileSystem      | DirACLAddEntry              | The DirectoryAddACLEntry activity adds an Access Control List (ACL) entry to a directory                                                                               |
|                 | DirACLRemoveEntry           | The DirectoryACLRemoveEntry activity removes an Access Control List (ACL) entry from a directory                                                                       |
|                 | DirCloseDirInfoSource       | The DirectoryCloseDirectoryInfoSource activity closes the Directoryinfo source and frees up resources                                                                  |
|                 | DirCloseFileInfoSource      | The CloseSourceFileFile activity closes the DirectoryFileInfo source and frees up resources                                                                            |
|                 | DirectoryCreate             | The DirectoryCreate activity creates all the directories and subdirectories in the specified path                                                                      |
|                 | DirectoryDelete             | The DirectoryDelete activity deletes a directory and its subdirectories if specified                                                                                   |
|                 | DirectoryMove               | The DirectoryMove activity moves a directory from a source to a destination                                                                                            |
|                 | DirectoryZip                | The DirectoryZip activity zips a directory                                                                                                                             |
|                 | DirGetNextDirInfoRecord     | The DirGetNextDirInfoRecord activity loads the next record from the specified list of selected Directoryinfo                                                           |
|                 | DirGetNextFileInfoRecord    | The DirectoryGetNextFileInfoRecord activity loads the next record from the specified list of selected fileinfo                                                         |
|                 | DirInitializeDirInfoSource  | The DirectoryInitializeDirectoryInfoSource activity initializes a list of directory information that can be accessed sequentially using the GetNextDirectoryInfoRecord |
|                 | DirInitializeFileInfoSource | The DirectoryInitializeFileInfoSource activity initializes a list of file information that can be accessed sequentially using the GetNextFileInfoRecord                |
|                 | FileACLAddEntry             | The FileACLAddEntry activity adds an Access Control List (ACL) entry to a file                                                                                         |
|                 | FileACLRemoveEntry          | The FileACLRemoveEntry activity removes Access Control List (ACL) entry from a file                                                                                    |
|                 | FileCopy                    | Copies files from one location to another                                                                                                                              |
|                 | FileDelete                  | The FileDelete activity deletes a file                                                                                                                                 |
|                 | FileFTPDownload             | The FileFTPDownload activity downloads a file from an ftp site                                                                                                         |
|                 | FileFTPUpload               | The FileFTPUpload activity uploads a file from an ftp site                                                                                                             |
|                 | FileMove                    | Moves a file from a source to a destination                                                                                                                            |
|                 | FileUnzip                   | The FileZip activity unzips a file                                                                                                                                     |
|                 | FileZip                     | The FileZip activity zips a file                                                                                                                                       |
|                 | SaveValueInNewFile          | The SaveValueInNewFile activity is used for saving field values to a file                                                                                              |
| FixedLengthFile | AppendFile                  | Appends the contents of one file to another                                                                                                                            |
|                 | CloseSourceFile             | Closes the specified Source file data source                                                                                                                           |
|                 | CloseTargetFile             | Closes the specified target file                                                                                                                                       |
|                 | CopyFileRecords             | Copies specific records from one file to another                                                                                                                       |
|                 | DeleteFile                  | Deletes the specified file                                                                                                                                             |
|                 | GetNextFileRecord           | Fetches the next record from the specified Source file data source                                                                                                     |
|                 | InitializeSourceFile        | Initializes a Source for reading data records from a fixed length file                                                                                                 |
|                 | InitializeTargetFile        | Initializes a Target for writing data records to a fixed length text file                                                                                              |
|                 | MapRecordFields             | Sets the values of the specified DataFields in a Target data source                                                                                                    |
|                 | SaveValueInNewFile          | The SaveValueInNewFile activity is used for saving a field value to a file                                                                                             |
|                 | SplitFile                   | Splits a large delimited file into multiple files                                                                                                                      |
|                 | WriteTargetFileRecord       | Inserts a record into the specified text file                                                                                                                          |


---

# 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.appstrategy.com/apprules-r-documentation/platform/platform-features/actions/action-categories/actions-datasource/files.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.
