FTP Windows to Unix

Hi,

I am trying to run the following in a bat file. It works fine as stand alone commands

]ftp.exe<linux box>
<user> 
<password>
ascii
delete PRICES.TXT
lcd "C:\Documents and Settings\PCLE12661\Mes documents\Emulation\Dax Prices"
cd /home/dsdev/other/in
put PRICES.TXT
bye

pause

I put the userid and password on the same line as the linux box but it still fails to take them in.

Do I have to put them in a script and do ftp.exe <script> or can I do it via a batch ?

Additionally, I tried to use open <linux box> in the batch file but this was rejected.

Any pointers gratefully received.

Here is an example MSDOS Batch file to adapt. Microsoft ftp syntax is pretty much the same as unix. We create a file containing the commands and then refer to that file in the ftp command line. The username and password go on the same line in that file.
Personally I would issue a local "cd" first rather than a ftp "lcd" because ftp is hopeless at dealing with names containing spaces.
If all your variables are static just put the ftp commands into a file rather than providing them as parameters.
BTW. I got the ftp syntax from the Microsoft website years ago.

REM ftptest3.bat
REM parameter driven with autologin

set X_FILE=%1
set X_USER=%2
set X_PASS=%3
set X_SERV=%4

echo user %X_USER% %X_PASS% > ftptest3.inp
echo ascii >> ftptest3.inp
echo get %X_FILE% >> ftptest3.inp
echo quit >> ftptest3.inp

ftp -n -s:ftptest3.inp %X_SERV%

Thanks for this. This works perfectly