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

FTP using variables for username/password/location/filename 2

Status
Not open for further replies.

Skiergirl

Programmer
Jan 9, 2006
14
0
0
US
Hi,

I need to put together an ftp command using variables for username, password, host server and filename. Does anyone have an example command line for that?

Currently, I'm using a runmap to pass my data, but instead of passing my data, I'm putting an empty file.

Any ideas????

Thanks,
Janice

 
A simple connection string would be:

-OAFTP1 '-URL ftp://user:password@server/directory/filename;type=I -TIMEOUT 20'

Ideally you'd include "-STAGE filename.tmp" to create a temporary filename too.

if you create an empty file, then you probably have no data to send, what does the FTP trace (-TV) say?

Cheers,
Olly.
 
This has been answered anumber of times before. Search on ftp.
But here it is again

The map ftpadapter has 1 input card and 1 output card both being text with no max size.

valid(run("ftpadapter",echoin(1, data) + " -OAFTP1 '-URL ftp://" + User + ":" + Pword + "@" + IPadd + "/" + Destination + " -MKD -T+'"),fail("ftp failed " + TEXT ( LASTERRORCODE ( ) ) + " " + LASTERRORMSG()))

Data, User, Pword, IPadd and Destination are all input parameters
You could replace the echoin with -IAFTP1 to pass a filename.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top