Online Expert Day - HPE Data Storage - Live Now
April 24/25 - Online Expert Day - HPE Data Storage - Live Now
Read more
Showing results for 
Search instead for 
Did you mean: 

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

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

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

Re: Ftp script

I'm not using OpenVMS!!!