HPE Community read-only access December 15, 2018
This is a maintenance upgrade. You will be able to read articles and posts, but not post or reply.
Hours:
Dec 15, 4:00 am to 10:00 am UTC
Dec 14, 10:00 pm CST to Dec 15, 4:00 am CST
Dec 14, 8:00 pm PST to Dec 15, 2:00 am PST
cancel
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
4 REPLIES
Å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