ftp to windows

Hi
I am trying to do an ftp to window w2k using the script
------------------------------------------------------
#!/bin/ksh
#script2 I found this script on UNIX script website
userstr="dt4406\iusr_vantage_dev"
W2Kservername="130.13.1.165"
pwstr="verint1!"
file1="TRP1run.sql"
file2="TRP2run.sql"
#ftp -in ${W2Kservername} <<-END_FTP #connect to W2K server
ftp -inv ${W2Kservername} <<-END_FTP >> $lll
user $userstr pass $pwstr #password $pwstr #myusername and mypassword on W2k ser
ver
put ${file1} #transfer this file from tru64 to W2K
server
put ${file2}
END_FTP
------------------------------------------------
My results are

hp-rp247:oracle:/oras01/app/oracle/iautodb/TRP_SQL>./aviv
Connected to 130.13.1.165.
220 DT-4406 Microsoft FTP Service (Version 5.0).
usage: user username [password] [account]
200 PORT command successful.
530 Please login with USER and PASS.
?Invalid command
200 PORT command successful.
530 Please login with USER and PASS.
221 GoodBye 123
----------------------------------
can anybody help with an idea what to do?
regards
avovcohen :confused:

This is covered in our FAQ section, but this line:
user $userstr pass $pwstr #password $pwstr #myusername and mypassword on W2k ser
looks wrong. Use:
user $userstr $pwstr

:wink: Hi
10x for the answer. currently I replaced the username and the password with that were input as $variables with the actual value of them see below and it worked. Do you have any explenation? do you know if there is a way to use variables (I prefer to have the user name and pass as an input to the script)?
10x again
:confused:
Avivcohen

The script

#!/bin/ksh
#script2 I found this script on UNIX script website
userstr="iusr_vantage_dev"
W2Kservername="130.13.1.165"
pwstr="verint1!"
file1="TRP1run.sql"
file2="TRP2run.sql"
#ftp -in ${W2Kservername} <<-END_FTP #connect to W2K server
ftp -inv ${W2Kservername} <<EOF >> log_ftp
#echo "user $userstr $pwstr "
user iusr_vantage_dev verint1!
ls
put ${file1} #transfer this file from tru64 to W2K
put ${file2}
EOF

you should be ok with the slight modification below ...

#!/bin/ksh
#script2 I found this script on UNIX script website
userstr="iusr_vantage_dev"
W2Kservername="130.13.1.165"
pwstr="verint1!"
file1="TRP1run.sql"
file2="TRP2run.sql"
#ftp -in ${W2Kservername} <<-END_FTP #connect to W2K server
ftp -inv ${W2Kservername} <<EOF >> log_ftp
user $userstr $pwstr
ls
put ${file1} #transfer this file from tru64 to W2K
put ${file2}
EOF

Hi
I want to off the Passive mode when i entered into server using ftp, is there any extra argument is available to off the passive mode.

user $userstr $pwstr