Jameser's Tech Tips

Sunday, July 16, 2006

Tip #19: Transferring Files via FTP Using "curl"

Today's tip is on transferring FTP files from the Command Prompt in Windows XP...

While Windows XP/2000 contains a command-line FTP client, it can be difficult to set up this application for unattended batch files and scripts... We'll be taking a look at a utility call curl, which was specifically developed for this purpose... It is yet another utility whose roots are in the Linux/Unix arena, but has been ported to the Win32 environment...

The Win32 port of curl can be downloaded from here...

After downloading and installing the utility, it can be used from the command line or added to virtually any script or batch file... From the Command Prompt, use the following syntax to transfer a file to an FTP server:

curl -T filenametoupload -u user:password ftp://yourFTPserver

The -T parameter specifies the "upload file", and the -u parameter allows you to specify the user name and password for this account... You can also consult the man page for additional parameters and options for this powerful utility...

If you have any questions please leave a comment, and check back tomorrow for more tips...

0 Comments:

Post a Comment

<< Home