Connecting to FTP server via OSX

Hello all,

I am having some trouble finding out how to mount my FTP server with AppleScript.
I basically want to script the following:

In the Finder, going to ‘Connect to Server’ via the ‘Go’ menu.
Inputting my ftp address (“”)
Then inputting my username and pass.

Is this possible? If so how?

I tried:

tell application "Finder"
	mount volume "" as user name "username" with password "password"
end tell

But got the error “File some object wasn’t found.”

Initially I think that you want to tell the finder by way of the open location in the Standard Additions osax Dictionary.
This script will open up a Connections Windows with some interesting options:

tell application "Finder"
	open location (choose URL with editable URL)
end tell

Look in the Standards Addtions Dictionary for more information.

Now in today’s Macscripter News, there is a link to Really Early Morning Software, by Matt Garrison and Kynan Shook, who have several script that connect to servers via FTP, SFTP, SSH and others.
Hope this helps

The standard format for including a username password in a URL is:


so something like this should work:

tell application “Finder”
open location “ftp://username:password@ftp.domain.dom/
end tell

If you want to prompt the user for their password:

display dialog “Enter your password:” default answer “” buttons {“OK”}
set thePW to text returned of the result
set theURL to “ftp://username:” & thePW & “@ftp.domain.dom/”
tell application “Finder” to open location theURL