I am attempting to ftp some files from a Windows XP SP2 client to a Sun OS
5.6 server by calling an ftp script from a command shell batch file. I have
done this before successfully, but do not seem to be able to do so now. The
host is defined in my local hosts file and I do not have any trouble
connecting and using commands from the ftp prompt. I have tried several
variations of the following (first the calling batch file line, then the
script contents).
ftp -s:example.ftp host
user
username
password
cd /unixdestdir
ascii
send example.txt
quit
I invariably get
331 Password required for username.
530 Login incorrect.
Does anyone know what I am doing wrong, or what other impediments might exist?
Philip Ashley - 29 Sep 2005 07:05 GMT
this works for me
ftp -s:example.txt ftphostname
and the contents of example.txt
username
password
ascii
cd /destdir
send test.txt
quit
i think just leave out 'user' line from yours
hth
philip ashley
>I am attempting to ftp some files from a Windows XP SP2 client to a Sun OS
> 5.6 server by calling an ftp script from a command shell batch file. I
[quoted text clipped - 23 lines]
> Does anyone know what I am doing wrong, or what other impediments might
> exist?