Previous Topic

Next Topic

Book Contents

Book Index

FTP - Specific Clients - cURL

cURL is a free command-line file transfer utility. It can be downloaded here.

cURL more operating systems than any other secure file transfer client (see cURL Operating Systems below).

MOVEit Transfer supports FTP/SSL and HTTPS uploads and downloads using cURL. cURL only supports explicit FTP over SSL at this time, so transfers will usually be initiated over port 21 and will be subject to the same firewall rules that other FTP/SSL transfers must adhere to.

FTP/SSL Downloads

Files may be downloaded directly from MOVEit Transfer (any version) with cURL if the full path to a particular file is known. The following example signs on to i.stdnet.com as ftpboi with password your_transfer_passwd and downloads a file called zerb.gif from the /Home/ftpboi folder.

curl -v -1 -o 
    "zerb.gif" --ftp-ssl --ftp-pasv -u ftpboi:your_transfer_passwd -Q "+CWD /Home/ftpboi" 
    "ftp://i.stdnet.com/zerb.gif"

Notes

FTP/SSL Uploads

Files may be uploaded directly to MOVEit Transfer (any version) with cURL if the full path of the folder where a file is to uploaded is known. The following example signs on to i.stdnet.com as ftpboi with password your_transfer_passwd and uploads a file called sdn.gif into the /Home/ftpboi folder.

curl -v -1 -T "sdn.gif" --ftp-ssl --ftp-pasv 
    -u ftpboi:your_transfer_passwd -Q "+CWD /Home/ftpboi" 
    "ftp://i.stdnet.com"

Note: The command has unusual path syntax. cURL cannot determine FTP folder paths, so you must explicitly set the full path with the -Q argument.

HTTPS Downloads

Files may be downloaded directly from MOVEit Transfer (version 3.2+) with cURL if the file IDs are known. The following example signs on to i.stdnet.com as a user named httpboi with password your_transfer_passwd and downloads FileID #9102186 as dwn.gif. The second curl line will sign the related user off cleanly.

curl -k -1 -v -L -c cookie2.txt -o "dwn.gif" 
    "https://i.stdnet.com/human.aspx?Username=httpboi&Password=your_transfer_passwd& 
    arg01=9102186&arg05=0/dwn.gif&arg12=downloaddirect&transaction=signon" 
curl -k -v -b cookie2.txt "https://i.stdnet.com/human.aspx?transaction=signoff"

Note: The filename you want to download must be in two places: the name of the output file (after the -o) and in the URL (after the arg05 tag). Otherwise, the syntax is similar to that used during "direct file downloads" initiated by MOVEit Transfer API applications running on web portals.

HTTPS Uploads

Files may be uploaded into MOVEit Transfer if the destination folder IDs are known. For example, the following three-call snippet will upload a file called hello1.gif of size (in bytes) 87054 into a MOVEit DMZ folder with ID 318060437 on i.stdnet.com as a user named httpboi with password your_transfer_passwd. The first curl line signs the related user on to MOVEit Transfer. The second curl line performs the transfer.

Important: Keep multi-line commands together so they aren't interpreted as separate calls. Also use, "--data-ascii" in place of "--data-binary" for ASCII files. The third curl call will sign the related user off cleanly.

curl -k -v -c cookie2.txt "https://i.stdnet.com/human.aspx?transaction=signon&username=httpboi&password=your_transfer_passwd" 
curl -b cookie2.txt -k -v --data-binary @hello1.gif     -H "Content-Type: multipart/form-data" 
    -H "X-siLock-AgentBrand: cURL" -H "X-siLock-AgentVersion: 4.32" 
    -H "X-siLock-FolderID: 318060437" -H "X-siLock-OriginalFilename: hello1.gif" 
    -H "X-siLock-FileSize: 87054" 
    "https://i.stdnet.com/moveitisapi/moveitisapi.dll?action=upload" 
curl -k -v -b cookie2.txt "https://i.stdnet.com/human.aspx?transaction=signoff"






cURL Operating Systems

cURL is available as a native executable on a wide range of current and legacy operating systems. For more information, see the cURL download site.