Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

FTP files programatically from CognosScript 1

Status
Not open for further replies.

steever

MIS
Mar 25, 2003
43
CA
Hey folks,

Any ideas on how I might get started on passing files via my FTP editor (WS-FTP Pro) from CognosScipt. I have a few weekly files I need to send to a client that are generated through CognosScipt - it would be nice to fire them out to their server without my having to launch my FTP app manually. I've got the Shell command in my code which launches my FTP app, I'm just not sure on how to pass the parameters that would connect, login to remote server, and then send the files ...

Any advice would be great!

thx.
Steve
 
With command line , you can use "ftp -s:myinput.txt"

myinput.txt contains:
open Myserver
myftpuser
myftppassword
cd /blabla/bla2
prompt
mput *.*
bye


In the input file you give one command per line.
Then in the cognos script you should be able to call an external application , with shell for example.

 
thx Draoued,

I created a file as you suggested with the commmands and I'm shelling out to it from CognosScript. It launches my FTP app which is great, however it is still prompting me for connection details. How then, using command line, can i pass these connection details to the FTP app and, futher to that, then send the necessary files without my interaction with the FTP app.

thx for your help

Steve
 
Add -i switch to the command:
"ftp -i -s:myinput.txt"

use
"ftp -?"
for the FTP usage.
 
the ftp -s:input.txt is working fine with the windows FTP application. With the WS-FTP Pro I don't know if you can give it files are parameters .

Have you tried with your ws-ftp something like:
wsftp.exe <myinput.txt
 
Guess I forgot to update this hmmm ...

For what its worth, thx Draoued (and Jim), with your
help this is working like a charm. I just ended up using
the FTP command line - there was no need to use an elaborate FTP editor for these purposes (as I was to find).

thx again.

Steve
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top