FTP connector methods
Summarize
Summary of FTP Connector Methods
The FTP connector methods allow you to interact with an FTP server as part of automation processes. To utilize these methods effectively, you must provide specific parameters to configure server access and perform various actions such as creating, deleting, downloading, and uploading files or folders.
Show less
Key Features
- SetConfiguration: Establishes connection details to the FTP server. Mandatory parameters include URL, username, and password.
- CreateFolder: Creates a specified folder on the FTP server. Requires the folder name as input.
- DeleteFile: Deletes a specified file from the FTP server. Requires the path to the file.
- DeleteFolder: Deletes a specified folder from the FTP server. Requires the folder path.
- DownloadFile: Downloads a file from the FTP server to a local drive. Requires both the remote file path and local path.
- DownloadFolder: Downloads a folder from the FTP server to the local drive. Requires the remote folder path and local folder path.
- GetFileList: Retrieves a list of files from a specified folder on the FTP server.
- RenameFile: Renames an existing file on the FTP server. Requires the current file path and the new name.
- RenameFolder: Renames an existing folder on the FTP server. Requires the current folder path and the new name.
- UploadFile: Uploads a file from the local drive to the FTP server. Requires the local file path and the destination path on the server.
- UploadFolder: Uploads a folder from the local drive to the FTP server. Requires both the local folder path and the destination folder path on the server.
Key Outcomes
By utilizing these FTP connector methods, you can automate file management tasks efficiently, ensuring seamless integration and management of files and folders on your FTP server. This capability enhances productivity by streamlining processes such as data transfer and organization within your ServiceNow environment.
The FTP connector methods perform various actions on the File Transfer Protocol server as part of an automation. To enable the methods, you must provide appropriate parameters.
SetConfiguration
Sets the File Transfer Protocol server access details. You must execute this method first.
To provide inputs to the parameters, see Configure port properties.
| Parameter | Description | Data port type | Data type | Default value | Mandatory? |
|---|---|---|---|---|---|
| Url | URL of the File Transfer Protocol | Data in | String | None | Yes |
| Username | Username to access the File Transfer Protocol server. | Data in | String | None | Yes |
| Password | Password to access the File Transfer Protocol server. | Data in | String | None | Yes |
CreateFolder
Creates a folder on the File Transfer Protocol server.
To provide inputs to the parameters, see Configure port properties.
| Parameter | Description | Data port type | Data type | Default value | Mandatory? |
|---|---|---|---|---|---|
| FolderName | Path in the File Transfer Protocol server where the folder will be created with the folder name. | Data in | String | None | Yes |
| Return | Returns True if the folder is created, else, returns False. | Data out | Boolean | None | Not applicable |
DeleteFile
Deletes a file in the FTP server.
To provide inputs to the parameters, see Configure port properties.
| Parameter | Description | Data port type | Data type | Default value | Mandatory? |
|---|---|---|---|---|---|
| RemoteFilePath | Path to the file you want to remove in the File Transfer Protocol server. | Data in | String | None | Yes |
| Return | Returns True if the file is deleted, else, returns False. | Data out | Boolean | Not applicable | Not applicable |
DeleteFolder
Deletes the specified folder in the File Transfer Protocol server.
To provide inputs to the parameters, see Configure port properties.
| Parameter | Description | Data port type | Data type | Default value | Mandatory? |
|---|---|---|---|---|---|
| RemoteFolderPath | Path to the folder in the File Transfer Protocol server including the folder name. | Data in | String | None | Yes |
| Return | Returns True if the folder is deleted, else, returns False. | Data out | Boolean | Not applicable | Not applicable |
DownloadFile
Downloads a file from the File Transfer Protocol server to the local drive.
To provide inputs to the parameters, see Configure port properties.
| Parameter | Description | Data port type | Data type | Default value | Mandatory? |
|---|---|---|---|---|---|
| RemoteFile | Path to the file in the File Transfer Protocol and the name of the file. | Data in | String | None | Yes |
| LocalFile | Path in the local drive where the file will be downloaded. | Data in | String | None | Yes |
| TimeOut | Time after which the request to the File Transfer Protocol server times out. | Data in | Integer | None | No |
| Return | Returns True if the file is downloaded, else, returns False. | Data out | Boolean | None | Not applicable |
DownloadFolder
Downloads a folder from the File Transfer Protocol server to the local drive.
To provide inputs to the parameters, see Configure port properties.
| Parameter | Description | Data port type | Data type | Default value | Mandatory? |
|---|---|---|---|---|---|
| RemoteFolderPath | Path to the folder in the File Transfer Protocol and the name of the folder. | Data in | String | None | Yes |
| LocalFolderPath | Path in the local drive where the folder will be downloaded. | Data in | String | None | Yes |
| TimeOut | Time after which the request to the File Transfer Protocol server times out. | Data in | Integer | None | No |
| Return | Returns True if the folder is downloaded, else, returns False. | Data out | Boolean | None | Not applicable |
GetFileList
Returns the list of files in a folder in the File Transfer Protocol server.
To provide inputs to the parameters, see Configure port properties.
| Parameter | Description | Data port type | Data type | Default value | Mandatory? |
|---|---|---|---|---|---|
| RemoteFolderPath | Path to the folder in the File Transfer Protocol and the name of the folder. | Data in | String | None | Yes |
| Return | Returns the list of files in the folder. | Data out | String | Not applicable | Not applicable |
RenameFile
Renames a file in the File Transfer Protocol server.
To provide inputs to the parameters, see Configure port properties.
| Parameter | Description | Data port type | Data type | Default value | Mandatory? |
|---|---|---|---|---|---|
| RemoteFilePath | Path to the file in the File Transfer Protocol server and the name of the file. | Data in | String | None | Yes |
| NewNameofFile | Path to the file in the File Transfer Protocol server and the new name of the file. | Data in | String | None | Yes |
| Return | Returns True if the name of the file is changed, else, it returns False. | Data out | Boolean | Not applicable | Not applicable |
RenameFolder
Renames a folder in the File Transfer Protocol server.
To provide inputs to the parameters, see Configure port properties.
| Parameter | Description | Data port type | Data type | Default value | Mandatory? |
|---|---|---|---|---|---|
| RemoteFolder | Path to the folder in the File Transfer Protocol server and the name of the folder. | Data in | String | None | Yes |
| NewNameofFolder | Path to the folder in the File Transfer Protocol server and the new name of the folder. | Data in | String | None | Yes |
| Return | Returns True if the name of the folder is changed, else, it returns False. | Data out | Boolean | Not applicable | Not applicable |
UploadFile
Uploads a file from the local drive to the File Transfer Protocol server.
To provide inputs to the parameters, see Configure port properties.
| Parameter | Description | Data port type | Data type | Default value | Mandatory? |
|---|---|---|---|---|---|
| LocalFilePath | Path to the file in the local drive. | Data in | String | None | Yes |
| RemoteFilePath | Path to the location in the File Transfer Protocol server. | Data in | String | None | Yes |
| Return | Returns True if the file is uploaded, else, returns False. | Data out | Boolean | Not applicable | Not applicable |
UploadFolder
Uploads a folder from the local drive to the File Transfer Protocol server.
To provide inputs to the parameters, see Configure port properties.
| Parameter | Description | Data port type | Data type | Default value | Mandatory? |
|---|---|---|---|---|---|
| LocalFolderPath | Path to the folder in the local drive. | Data in | String | None | Yes |
| RemoteFolderPath | Path to the location in the File Transfer Protocol server. | Data in | String | None | Yes |
| Return | Returns True if the folder is uploaded, else, returns False. | Data out | Boolean | Not applicable | Not applicable |