
$ updateWeb /home/bainm/webfiles webdirectory The automation process is made much easier by the fact that macros can be used with FTP - they can use any standard FTP command and are defined in the. netrc file in place FTP access becomes very simple:Īnd now any file processing can be automated:Įcho put testfile1.txt | ftp Įcho get testfile2.txt | ftp

netrc file has its permissions set to user read only (and unreadable by anyone else) therefore the most important job is to do: Obviously, before continuing, there is also a security risk to be considered here - the user's password is being saved in a text file however, FTP reduces this risk by only running if the. netrc must always end with a blank line (and a blank line must also be inserted between any FTP account definitions). netrc file does not exist by default - it needs to be created manually and placed in the user's home directory it needs to contain the connection details for any FTP accounts to be used: However, there is a limitation with using FTP in this way - the user's password must be entered manually, preventing the process from being automated and that's where the. Name (.uk:bainm): sitenameġ50 Opening BINARY mode data connection for testfile.txt connect to the FTP server using their own user name.

The majority of FTP users will be happy to use the graphical interface, but that will not suffice for any programmers or web site owners who want to automate the upload (or download) process - and that's where the command line FTP can be useful.Īt it's simplest level the command line FTP works in the same way as the GUI FTP, and the user will:

FTP actually has its own programming language.įilezilla is open source software distributed free of charge.FTP can be run from the command line and can, therefore, be used in scripts.Most people's experience of FTP (File Transport Protocol) is through a form based GUI (Graphical User Interface) - the kind of interface that allows a user to drag and drop files from their pc to their web site however, for the programmer, FTP has much more to offer: FTP (File Transport Protocol) has been around for a long time, but it's still as useful as it ever was - especially when it comes to automating processes with FTP macros.
