Page 1 of 1

Working with FTP, differences from documentation

Posted: Thu Aug 29, 2013 11:00 pm
by jassing
The documentation says you must set the current directory before doing a putfile or getfile.
However, on windows, at least, I am seeing that I do not have to do that. Is it a fluke that it's working, or was the ftp library updated ? (ie: is the doc right or wrong?)

Re: Working with FTP, differences from documentation

Posted: Thu Aug 29, 2013 11:15 pm
by tinman
What version of the docs are you looking at? For PB 5.20 b 14 the manual says this (about the Filename$ parameter to SendFtpFile()):
PB Manual wrote:The name of the file to send. If the filename does not include a full path, it is interpreted relative to the current directory.
Edit: and similar for ReceiveFtpFile().

So it can work both ways depending on whether you pass a full or relative path. I've not actually tried this to see whether it's true or not though.

Re: Working with FTP, differences from documentation

Posted: Thu Aug 29, 2013 11:26 pm
by jassing
I must have had a brain fart while reading... I swear it said that the file must be in the current folder. Same for setftpdirectory, you have to change 1 at a time.
Well; wouldn't be the 1st time I misread something.
Thanks.