Skip to main content

FTP - Download File

Summary

This script will download a file from the target FTP server.

Time Saved by Automation: 10-20 Minutes

Sample Run

Sample Run

Variables

VariableDescription
PS_ResultsThis stores the PowerShell script output, indicating whether the file was successfully downloaded from the provided FTP server or not.

User Parameters

NameExampleRequiredDescription
FTP_Server_Pathhttps://ftp.server/downloadTrueThe FTP server path where the file is stored.
FTP_Usernametest_userTrueThe FTP username to access the FTP site.
FTP_Passwordtesting@123TrueThe FTP password to access the FTP site.
FTP_FilenameFilename.zipTrueThe filename with extension to download from the FTP site.
Download_to_PathC:/Windows/Temp/FolderTrueThe local destination path on the agent.

Process

  • This script will attempt to download the file from the FTP site.
  • It will first check whether all user parameters are provided; if not, the script will exit. If all parameters are provided, it will attempt to download the file from the FTP site as per the provided details.
  • It will log the output in the script indicating whether the download was successful or not.

Output

  • Script log