Operating System - HP-UX
1833024 Members
2456 Online
110049 Solutions
New Discussion

FTP Script Help needed... ?

 
SOLVED
Go to solution
rveri
Super Advisor

FTP Script Help needed... ?

Hi All ,

I need to make one FTP script , that will transfer files from serverA to serverb, and execute few ftp command at serverB.

Following commands given to me , I wanted to know how to proceed, to make this script:

-----------
1.Issue an FTP command to create a file on the Server (serverB)
quote CRTP FILE(USERNAME/PASSWORD) RCDLEN(1055)
2. Ensure the success of the FTP command
3. Issue an FTP command to transfer your file on the EDI server (serverB)
put (your file name) USERNAME/PASSWORD

4. Ensure the success of the FTP command
5. Issue an FTP command to initiate a process on the Server (serverB)
quote RCMD CALL PGM(USERNAME/PASSWORD)
---------------------

Your suggestion is requested.

Thanks.
3 REPLIES 3
James R. Ferguson
Acclaimed Contributor

Re: FTP Script Help needed... ?

Hi Rveri:

There are a multitude of threads in this forum dealing with FTP threads. I respectfully suggest that you (Google) search 'itrc.hp.com' using such keywords as "ftp", and "netrc".

Regards!

...JRF...
Sandman!
Honored Contributor
Solution

Re: FTP Script Help needed... ?

rveri,

ftp is not the answer to all your problems. If I understand you correctly, the logic can be encapsulated into a single script using various commands and tools NOT just ftp. For example:

1.Use remsh to create a file on another server
2.Ensure its success using $?
3.ftp the files from serverA to serverB
4.Verify success with $?
5.Use remsh to start a process on the remote serverB.

cheers!
Raj D.
Honored Contributor

Re: FTP Script Help needed... ?

Hi,
You can also check with a script like this:

#!/usr/bin/sh
########## FTP Script for sending file.
ftp -n <
" If u think u can , If u think u cannot , - You are always Right . "