Author Topic: Problem with ftp  (Read 3267 times)


  • Newbie
  • *
  • Posts: 8
Problem with ftp
« on: January 09, 2012, 05:57:40 am »

I am enjoying using my new P175, which is a very useful tool.

In the Fm Analyzer Tool application, I am attempting to use FTP to upload files to a Unix system. If I specify a 'Remote Dir' of 'outdir' (outdir exists), the files are NOT being written to the 'outdir' directory. Instead, they are being written to the directory above that, using a file name of, for example, 'outdir\myfile.jpg'. Perhaps the code is assuming that the FTP server is using Windows naming convention, and the Unix FTP server just includes the '\' as part of the file name?

Chuck Wright


  • Hero Member
  • *****
  • Posts: 588
Re: Problem with ftp
« Reply #1 on: January 09, 2012, 09:56:16 am »
Currently the ftp upload is handled as follows (shortened):

Code: [Select]
if (Length(fp)>0) and (RightStr(fp,1)<>'\') and (RightStr(fp,1)<>'/') then fp:=fp+'\';
IdFTP1.Put(fw+fn, fp+fd, false);

fp is the text from Remote Dir box,
fd is the remote file name.

So the backslash '\' is added at the end of the Remote Dir by default.
I think you can simply solve it by adding '/' at the end of the Remote Dir.


  • Newbie
  • *
  • Posts: 8
Re: Problem with ftp
« Reply #2 on: January 09, 2012, 04:44:14 pm »
Yes, that makes it work. Thanks!
- C