[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

FTPing (was RE: Brio Portal?)



FTP under Windows and other operating systems allows you to read commands
from a script.  You can put the username and password into the script.
Under many UNIX versions of ftp, you can set up a .netrc that contains
login information and commands.

Here's an example that I know works (running under NT).

First, a batch file:

    @echo off
    echo FTPing files...
    ftp.exe -n -s:myscript.ftp > ftp.log
    echo Done.

Under UNIX, you'd use something more like:
    ftp < myscript.ftp > ftp.log

Exact details depend on the shell you are using.


Then set up the script (myscript.ftp):

    open FTP.MYSITE.COM
    user
    MYUSERNAME
    MYPASSWORD
    ascii
    cd /my/directory/path
    put MYFILE.DAT myfile.dat
    quit

Replace MYUSERNAME and MYPASSWORD with the appropriate login and
password, obviously.  Everything between the password and "quit" will
be typical ftp commands.

Good luck.