Automate FTP / Scripting FTP Transfers

One of our most frequent questions is how to automate ftp transfers. There are several approaches. Since I'm writing this post, we will start with my favorite technique. :slight_smile:

In Automated FTP task I present a simple example of my ksh co-process technique. And note that later in this thread I explain how it works. And in For Loops Within Ftp Comands I show how to use the co-process technique in conjunction with a loop.

In Automated FTP we see an example of another technique called a "here document".

And in Telnet and file Copy/Delete Problem we see and example of the .netrc technique.

There are dozens of more threads, but they are all using one of the techniques above (or a combination of techniques 2 and 3). You can find them with our search function.

For a perl solution, see Perl scirpt for automatic file transfer.

connecting to Unix from windows - help has this link which may help if you need to have an ftp script on a box running Windows.

And then, there is this.

sftp is different program that uses a different protocol and has different requirements. sftp scripting recommends this site. Also see automate sftp using unix script.

1 Like