# Import From File

> Read data from a selected file into Datahub.

The Import From File node imports files from a configured file system into a dataflow. This node can retrieve one or multiple files from a file system location and make them available for further processing within the dataflow.

The configured path can reference either a single file or a directory:

- When a file is specified, that file is imported.
- When a directory is specified, all matching files are imported based on the configured search pattern.

Steps:

1. Select a valid Connection.
2. Configure the Path to a file or directory.
3. Optionally enable Subdirectories to include files from nested folders.
4. Define a Search Pattern to filter the files that should be imported.
5. Execute the node: the matching files are returned to the dataflow.

## Configuration

| Setting | Required | Description |
| --- | --- | --- |
| Connection | Yes | The file system connection used to access the files. |
| Path | Yes | The file or folder location to import, e.g. `C:\Import\customers.csv`, `C:\Import`, `\\Server\Shared\Invoices`. Can be a fixed value or a column mapping from a previous node. When using a column mapping, the node must be executed using the For Each Row execution type. |
| Subdirectories | No | When enabled, the node searches all subdirectories below the configured path. When disabled, only files located directly in the specified path are processed. |
| Search Pattern | No | Wildcard filter for which files to include, e.g. `*.*`, `*.csv`, `*.xml`, `invoice_*.pdf`. Only matching files are returned. |

## Output

The node returns one record for each imported file:

| Field | Description |
| --- | --- |
| FileName | Name of the file. |
| FileExtension | File extension. |
| FileSize | File size in bytes. |
| FileLastAccessTime | Last access timestamp. |
| FileCreationTime | File creation timestamp. |
| FileContent | File content. |

The output can be used by subsequent nodes for further processing.

## Tips

- Use specific search patterns to limit the number of imported files.
- Enable Subdirectories only when files may be stored in nested folders.
- Verify that the configured path exists and is accessible.
- Ensure the configured connection has sufficient permissions to access the specified location.