PDA

View Full Version : ftp command line help




mystixman
Sep 25, 2003, 10:37 PM
I want to upload a file in one line in the terminal ( for an applescript )

I already know how to include the user and pass in it, but don't know how to include the file and where i want to put it. I checked the man page and didn't see it or didn't SEE it. Any help would be greatly appreciated.



bousozoku
Sep 25, 2003, 11:56 PM
You should be able to put the user account and password in a text file and pass it to ftp.

Create a text file--I would name it for the server--with contents like this

myuseraccount
myuserpassword

I would also create a script named for the transfer, with contents like this:

#!/bin/sh
ftp ftp.someserver.com <someserver.txt

It should pass the information as ftp asks for it.

Doctor Q
Sep 26, 2003, 12:22 AM
If that doesn't work, post again. I have some scripts for ftping particular files to particular hosts and I could turn one into something generic to post for you.