Operating System - Microsoft
cancel
Showing results for 
Search instead for 
Did you mean: 

Need script to ftp single file

Vishal_1980
Regular Advisor

Need script to ftp single file

Hello Expert,

 

Yesterday ,Pattrick provided me one program to ftp single file from UNIX to windows server 2008.

Below is the script content:

 

open srv0536

pvishal

passw0rd

lcd /D "D:\MSCM\DSSO"

bin
prompt
cd /law/c123da/gen/perms_files
pwd
dir
get test_ftp

bye

 

The file name is ftp-file.script.

 

There is one more file called ftp-file.bat & the contents are,

ftp -i -s:ftp-file.script

 

I use to run this command from the win 2008 server to ftp the file from UNIX box therefore getting the below error,

 

C:\Users\VPatankar\Desktop>ftp -i -s:ftp-fil
ftp> open srv0536
Connected to srv0536.netaspx.com.
220 srv0536 FTP server (Version 4.2 Mon Dec
User (srv0536.netaspx.com:(none)):
500 'USER ': command not understood.
Login failed.
ftp> userid "kvaze"
Invalid command.
ftp>
ftp> password "passw0rd"
Invalid command.
ftp>
ftp> lcd /D "D:\MSCM\DSSO"
lcd local directory.
ftp>
ftp> bin
200 Type set to I.
ftp> prompt
Interactive mode On .
ftp> cd /law/c123da/gen/perms_files
530 Please login with USER and PASS.
ftp> pwd
530 Please login with USER and PASS.
ftp> dir
530 Please login with USER and PASS.
530 Please login with USER and PASS.

 

Request you to please provide me the solution.

Thanks

Vishal

 

 

P.S. This thread has been moved from HP-UX > Languages and Scripting to Microsoft > general. - Hp Forum Moderator

2 REPLIES
Patrick Wallek
Honored Contributor

Re: Need script to ftp single file

The only thing I can suggest is to play with the script and see what you can figure out.  You can also try google and see if there are any hings there.

 

The thing I posted yesterday worked on my PC, but I am running Windows 7, so your mileage may vary.

 

Also note that the output you are providing from your attempt to run the script does not appear to match the  ftp-file.script file that you posted.

Patrick Wallek
Honored Contributor

Re: Need script to ftp single file

By the way,  your other thread was moved to the Windows category.

 

http://h30499.www3.hp.com/t5/General/Need-script-to-ftp-single-file/m-p/6600000#M11521