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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

FTP in CognosScript 1

Status
Not open for further replies.

damzi

Programmer
May 3, 2004
66
US
I am looking for a cognosscript to FTP files to another server (with the IP address, UsrNm, Pswd and the folder path). Does any one have such a script ?
 
i doubt the availability. but in 15seconds.com there is a VB script that uses windows API for FTP and it works. u can modify that to ur requiremnt and give a try.

regards,
sudhi
 
Thanks, while I check that I wonder if any one here will have any idea of using the DOS commands from the commnad line to FTP the files. Is there a script out there for this ? Thanks
 
hey - I have the DOS scripts to FTP - goes sth like this

ftp <server name>
User <username>
Password <password>
ftp> lcd <path from>
ftp> cd <path to>
ftp> mput <filenames>

Thanks,
 
If you know how to use the execute shell command from Script then you can use the following:

ftp -s:filename

This command line start FTP with a File as parameter.
One example of the filename could be:

open myservername
userid
password
cd \cognos\cubes
prompt
mget *.mdc
bye

This will open the FTP connection with the server "myservername" , give the user = userid , send the password , move to another folder ,disable the prompt for confirmation , get all the mdc files from this folder and close the ftp connection.

You can try that from command line , it works also and it s easier to test it.
 
I have a question regarding the script above. Will the script overwrite any existing files in the target folder or would I have to add something else to the script for overwriting the files.
 
Yes , the Prompt is disabled , it should overwrite existing files in the target folder.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top