Pira.cz Technical Forum

FM Analysis => PIRA75/P175/P275 Control Software => Topic started by: chuck-wright on January 09, 2012, 05:57:40 am

Title: Problem with ftp
Post by: chuck-wright on January 09, 2012, 05:57:40 am
Hi,

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?

Thanks,
Chuck Wright
Title: Re: Problem with ftp
Post by: Jan 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);

where
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.
Title: Re: Problem with ftp
Post by: chuck-wright on January 09, 2012, 04:44:14 pm
Yes, that makes it work. Thanks!
- C