1754020 Members
7686 Online
108811 Solutions
New Discussion

Ftp script

 

Ftp script

Hi to all,
I want to transfert files (files are générated automaticly by C program) one by one from HP-UX to NT system.

My task is how can i do to run ftp from my C program and pass the file name to FTP.

I need a script to automate transfer files from HP-UX to NT via FTP.
Help is badly needed on this case.
thanks in advan
4 REPLIES 4
Åge Rønning
Trusted Contributor

Re: Ftp script

The easiest way would be to use LIB$SPAWN with the FTP command with /INPUT=command-file to specify the files to put/get.

Or use LIB$SPAWN to execute a command procedure to do whatever you like.
VMS Forever
Martin P.J. Zinser
Honored Contributor

Re: Ftp script

Hello Abdel,

thats what you get for asking an HP-UX question in an hp OpenVMS forum. Ages answer is perfectly correct (in case you used OpenVMS), but pretty useless to you ;-).

Try your question again in the HP-UX forum at

http://forums1.itrc.hp.com/service/forums/familyhome.do?familyId=117

I guess the solution will involve a call to fork(). Since I have not touched UX in a long time, I am not sure about the ftp part, on Linux your could do something like

ftp ftp://user:pwd@node/ to provide most of the parameters already. The rest (since you want to "put") would need to come from a temporary input file most probably.

Greetings, Martin
Åge Rønning
Trusted Contributor

Re: Ftp script

Ooooops!!!
First rule: Assume nothing! (And read the Q...)
Sorry! Just read the task and assumed VMS in this forum....
VMS Forever

Re: Ftp script

Hi,
I'm not using OpenVMS!!!

Regards