[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: TESTPUT



Sender: Scott Klement <sk@xxxxxxxxxxxxxxxx>


Hi Shannon,


However, when I attempt to use a variable for those paramaters, I always get
a "No Such File or Directory" error message.  I've tried adding an
apostrophe around both ends of the path.

If the pathname has spaces in it, you might need to add doublequotes around it (but not apostrophes!) If it doesn't have spaces in it, you don't have to do anything special.



I've tried appending a null to it, and of course, I trim all the extraneous
garbage from the variable that may have been passed along with it on the
call to the program.

FTPAPI is written in RPG, not C. If you append a NULL, it'll send that NULL to the server (or make it a part of the pathname if you specify it in peLocal.)


It doesn't know that you meant it to terminate the string.


I can't figure out why a hard coded path works but using a variable for the
path doesn't.

FTPAPI doesn't know the difference between a hard-coded pathname or a variable. It must have something to do with the contents of the variable.



No doubt it's something very basic I'm missing here, but I can't seem to
figure it out.

Any suggestions on things I can try?

Make sure you've got the parameters in the correct order. The first parm to FTP_put() is the session number, the second is the REMOTE pathname (not the local one!) and the 3rd is the local pathname.


Make sure that you've already created the directory where the local file should be placed. (The mkdir() API works nicely for this.)

IF that doesn't help, please post your code.
-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubsribe from the list send mail
to majordomo@xxxxxxxxxxxxx with the body: unsubscribe ftpapi mymailaddr
-----------------------------------------------------------------------