Help Centre › Building Processes
This article describes the RPA FTP functionality to get the size of a file on a remote server.
For a full list of available functions, please read FTP functions.
Description
The File size function returns the size in bytes of a file on the remote server.
Setting it up
To use the File size function, follow these instructions:
{{popups:rpas/add:action=ftp-file-size}}
Once on a process map:
- Navigate to the process where you would like to add the File size function
- Click on the green button’s drop-down (right side of the green button labelled “Process”)
- On the menu that appears, click on the “+ Activity” item
- From here you can select the FTP File size option
- Click "Add" once you are done
Input parameters
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
| Name | Yes | Text | - | The name of the FTP connection to use |
| Path | Yes | Text | - | The path to the file on the remote server |
| Variable | No | Text | file_size | Variable name to store the file size |
Output variables
| Variable | Type | Description |
|---|---|---|
| {file_size} | Integer | The file size in bytes |
Errors
| Error | Description |
|---|---|
| Connection not found | No connection exists with the specified name |
| File not found | The remote file does not exist |
Tips
- Returns the size in bytes – divide by 1024 for KB, by 1048576 for MB
- Use to check file sizes before downloading large files