ftp to windows


 
Thread Tools Search this Thread
Operating Systems HP-UX ftp to windows
# 1  
Old 04-26-2005
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-rp247Smilieracle:/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 Smilie
# 2  
Old 04-26-2005
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
# 3  
Old 04-27-2005
It works

Smilie 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
Smilie
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

Last edited by avivcohen; 04-27-2005 at 02:44 AM.. Reason: forgot to add the script
# 4  
Old 04-27-2005
you should be ok with the slight modification below ...
Code:
#!/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

# 5  
Old 05-09-2009
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
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

FTP from Windows to Solaris

Dear All, As I am new to Solaris ..I need some help How is FTP access given from Windows machine to solaris machine. The scenario is that : I have a Xp host system and Solaris as my guest OS in my vmware. I need to tranfer some files from Windows to Solaris.? I am using... (7 Replies)
Discussion started by: bharat_
7 Replies

2. AIX

Do I need to configure my local windows to FTP files from local windows to a UNIX AIX server?

Hi Friends, I have this script for ftping files from AIX server to local windows xp. #!/bin/sh HOST='localsystem.net' USER='myid_onlocal' PASSWD='mypwd_onlocal' FILE='file.txt' ##This is a file on server(AIX) ftp -n $HOST <<END_SCRIPT quote USER $USER quote PASS $PASSWD put $FILE... (1 Reply)
Discussion started by: rajsharma
1 Replies

3. Shell Programming and Scripting

ftp from unix to windows

How to do ftp from unix to windows i have some files in a dir in unix box and i want to put those files in windows through FTP. How to do this ? (9 Replies)
Discussion started by: ali560045
9 Replies

4. UNIX for Dummies Questions & Answers

Windows to UNIX FTP

Good Morning, I am currently having a setup of running a batch file in windows to ftp certain files to unix and after that one i login to a unix box to manually run a script to clean up those files and combine them into one and get go back to windows to run another batch of file to get the... (4 Replies)
Discussion started by: ryan_estiya
4 Replies

5. Shell Programming and Scripting

FTP from windows to unix

I am trying to run this script to ftp something from windows and am getting the following error when trying to view the directories.. Connected to 192.168.1.22. 220-Microsoft FTP Service 220 LOGS ftp> ls -lrt 530 Please login with USER and PASS. 530 Please login with USER and PASS. This is... (1 Reply)
Discussion started by: dowell
1 Replies

6. UNIX for Dummies Questions & Answers

FTP from unix to Windows

Hi, I know that there should be a FTP server in Windows or a FTP listener daemon running in windows. Iam a beginner. May I know, what setup need to be done on Windows/unix end so that, a file can be transferred using sftp/scp from unix to windows. Thanks in Advance. (2 Replies)
Discussion started by: deepakwins
2 Replies

7. UNIX for Dummies Questions & Answers

FTP from windows to unix

Hi all, How to FTP an excel format file located in windows to unix using shell script.Any particular commands we have to use? Thanks& Regards, rrs (4 Replies)
Discussion started by: rrs
4 Replies

8. UNIX for Dummies Questions & Answers

FTP from Unix to Windows: Need help!

Hello everyone, I know nothing about Unix, however, I developed a Windows VB app that takes ascii flat files and generates formatted excel reports in single or batch mode. There are about 200 reports that come off the mainframe from a unix box which I have to manually download into my Windows... (3 Replies)
Discussion started by: eguy
3 Replies

9. Shell Programming and Scripting

ftp file to Windows

I need to ftp Unix log file to Windows and using VB code to read file. After I ftped my Unix log file to Windows side, I found out that there is no carriage return, so I turned off 'cr' when ftp the file. But my VB code can't see "EOF" signal from this file, should I just add additional line... (2 Replies)
Discussion started by: whatisthis
2 Replies

10. UNIX for Dummies Questions & Answers

ftp to windows box

I want to be able to connect from my UNIX box to my Windows box via FTP. I am able to succesfully connect to my Windows box via FTP as anonymous, however I can not navigate directories. Issuing the followings commands provides no help: cd c:\ cd c: Both return with "c:: The filename,... (5 Replies)
Discussion started by: here2learn
5 Replies
Login or Register to Ask a Question