Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: script
> > When I try to run this i get the following
> > G:\>FTP -s:junk.ftp
> > ftp> OPEN 10.5.1.100
> > Connected to 10.5.1.100.
> > 220 bsd.sdcdomain.com FTP server (Version 6.00LS) ready.
> > User (10.5.1.100:(none)):
> > 331 Password required for USER ftp .
> > 530 Login incorrect.
> > Login failed.
>
> The reason for that is interactive prompting by the FTP client. You need
to
> code the FTP script as follows:
>
> --contents of junk.ftp--
> open 10.5.1.100
> quote user ftp
> quote pass ftp
> cd /var/ftp/incoming
> type ascii
> get installPrep.sh
> bye
> --contents of junk.ftp--
>
>
> Now you fire up FTP and *disable* it's interactive prompting using the -n
> switch, i.e.
>
> C:\> ftp -n -s:junk.ftp
>
>
> Of course, this has absolutely _nothing_ to do with Oracle. :-)
I done it like this
d:
cd d:\orant\net80\admin
DIR
ECHO.open 10.5.1.100>script.ftp ECHO.ftp>>script.ftp ECHO.ftp>>script.ftp ECHO.CD /incoming>>script.ftp ECHO.bin >>script.ftp ECHO.get TNSNAMES.ORA>>script.ftp ECHO.BYE>>script.ftp