FTPit Pro

Transfer files to and from an FTP server

<- Back to FTPit Pro function list

FTPit_QuickDownload

Description

This function allows you to quickly download a single file using an FTP URL format. You just give this function the full URL to the file you want to download, and it connects, downloads, and disconnects for you. The format of the URL is as follows:

ftp://user:pass@domain.com:port/dir/to/file.txt

There are several things that can be defined here, a few of which are optional:

  • Instead of "ftp", you can specify "ftps" to have the plug-in connect with SSL to the FTP server. It will use the equivalent of the "After Connect" setting. If your FTP server requires the "Before Connect" SSL setting to connect on port 990, then specify ":990" after the domain name.
  • The "user" is optional. If it's not there, the plug-in will attempt to connect anonymously to the FTP server.
  • The "pass" is optional if your FTP server does not require a password. If you do need a password, but would rather be prompted for it instead of hard coding it, specify "__ASK__" as the password.
  • The "domain.com" is the domain name or IP address of the FTP server you are trying to connect to. Instead of specifying a domain name, though, you can specify an existing Account name here (defined using the FTPit_AddAccount or FTPit_ConfigureAccount functions). If you specify an Account Name, the plug-in will pull all needed username, password, domain name, etc values from that Account.
  • The "port" is optional and defaults to port 21. If you need to use the "Before Connect" SSL setting, specify 990 here.


Here are some example URLs:

ftp://some.domain.com/some/dir/file.jpg
ftp://bob:secret@some.domain.com/some/dir/file.jpg
ftps://bob:secret@some.domain.com/some/dir/file.jpg
ftps://bob:__ASK__@some.domain.com:990/some/dir/file.jpg
ftp://MyFTPAccount/some/dir/file.jpg

Return Type
Text
Format
FTPit_QuickDownload ( URL ; LocalDirOrFile ; ShowStatusWindow )
Required Parameters
  • URL

    The fully qualified URL of the file to Download.

Optional Parameters
  • LocalDirOrFile

    The Path to the Local Directory or File to Download to. (Can be a Full Path or Relative Path. You can optionally specify a File Name to Rename the File.)

  • ShowStatusWindow

    If True, this function will Show a Status Window.

Related Items
FTPit_QuickUpload