ftp command line help

Discussion in 'Mac Apps and Mac App Store' started by mystixman, Sep 25, 2003.

  1. mystixman macrumors regular

    Joined:
    Aug 11, 2002
    Location:
    USA
    #1
    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.
     
  2. bousozoku Moderator emeritus

    Joined:
    Jun 25, 2002
    Location:
    Gone but not forgotten.
    #2
    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.
     
  3. Doctor Q Administrator

    Doctor Q

    Staff Member

    Joined:
    Sep 19, 2002
    Location:
    Los Angeles
    #3
    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.
     

Share This Page