If you often transfer the same file to/from an FTP server (or do anything repetitively with an FTP server), you can use UNIX and a simple script to automate the process. Although similar things are probably possible with grapical clients, this will teach you a bit about UNIX and a very basic shell script.
I use two such scripts on my OS X box. Since my home machine is occasinally out of OS X, that means that my family's OS X hosted website is not accessible. Before I shut down OS X, I upload a "Our server is down" page to my ISP-hosted site. When I return to OS X, I upload a "Our server is up" page. This way, our family and friends can tell easily if the site is up or not. I manage both these tasks with a double-click on an icon in the finder, thanks to these scripts.
This tutorial requires some basic understanding of the command line and an OS X text editor such as vi or pico. Read the rest if you'd like to see how to set up a simple automated FTP script.
To create these script(s), open a terminal and navigate to the directory where you'd like the script to live. For this example, I'm saving it in /Users/robg/Documents. Once in the proper directory, start an editor for the new file. The name and extension aren't that important, so pick one that you like:
vi siteup.xfrThis example script takes an HTML file from the same directory that we're working in, and uploads it to the ISP as the new 'index.html' file.
#! /bin/shLooking line by line, here's what the script does.
echo Uploading the ServerUp page...
# Start of "here" document
ftp <<**
open www.yourISP.com
cd wwwdir
ascii
put /Users/robg/Documents/siteup.html index.html
bye
**
# End of "here" document
echo FTP ended - your web site is now marked as UP.
chmod ugo+x siteup.xfrThis adds execute permissions to the file. The next (and last) step is the creation of a file called .netrc in the top level of your home directory. Follow these steps to create the file:
cd ~Inside the editor, insert the following lines:
vi .netrc
machine www.yourISP.comObviously, replace 'yourISP', 'yourUNAME', and 'yourPWORD' with your ISP, username, and password. Save the file and quit the editor.
login yourUNAME
password yourPWORD
chmod go-rwx .netrcThe .netrc file is needed because the FTP program will not (for security reasons, I believe) accept username and password within the context of a "here" document. Using this as a model, you can see that a number of variations are possible, for both uploading and downloading files.
./siteup.xfrinto a terminal session (assuming you're in the directory that holds the script, of course), and the program will run. Alternatively, click on the file in the GUI, open an inspector window, choose the Application drop-down, click on the "A Specific Application" button, then click on the "All Applications" drop down, navigate to the Terminal program in the /Applications/Utilities folder, and select it. Close the inspector, and you can now double-click the script in the finder.
Mac OS X Hints
http://hints.macworld.com/article.php?story=20010125232914252