Hi Pat,

I would try a regular ftp client and see what paths work for it (and
that it does work), and then compare (I like Fetch).

dave

On Fri, Apr 20, 2018 at 6:39 AM, Pat Bensky via 4D_Tech
<4d_tech@lists.4d.com> wrote:
> Using v16.3 32-bit and 64-bit
>
> I'm trying to download some files via FTP.
> I get a list of the files in the specified directory:
>
> $error:=*FTP_GetDirList *(vFTP_ID;$hostpath;$atDldFileNames;$aiDldFileSizes;
> $aiDldFileKinds;$adDldFileDates;$aiDldFileTimes)
> (all arrays have been previously declared).
> No problem :)
>
> Then loop through the array of file names and hopefully download each one:
>
> *For *($i;1;*Size of array*($atDldFileNames))
>
> *If *($$aiDldFileKinds{$i}=1)
>
>   // skip this dude
>
> *Else *
>
> $localFilePath:=$localPath+$atDldFileNames{$i} // eg: "Macintosh
> HD:Users:patbensky:clients:Anderson
> Vacations:images:10--MedicineTrailSnow.jpg"
>
> $filepath:=$hostpath+"/"+$atDldFileNames{$i} // eg:
> public_html/Anderson/uploads/10--MedicineTrailSnow.jpg
>
> $err:=*FTP_Receive *(vFTP_ID;$filepath;$localFilePath;0)
>
> // $err is always -1 or 10060 (file not found)
>
> *End for  *
>
>
> I've tried various different versions of the file pathnames but can't find
> one that works.
>
> For example:
>
> $hostpath:=$atDldFileNames{$i}
>
> localFilePath:=$localPath+"temp.jpg"
>
> .. and various other things.
>
>
> A/ny suggestions as to where I'm going wrong?
>
>
> Thanks!
>
>
> Pat
>
>
>
> --
> *************************************************
> CatBase - Top Dog in Data Publishing
> tel: +44 (0) 207 118 7889
> w: http://www.catbase.com
> skype: pat.bensky
> *************************************************
> **********************************************************************
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://lists.4d.com/faqnug.html
> Archive:  http://lists.4d.com/archives.html
> Options: https://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **********************************************************************



-- 
David Nasralla
Clean Air Engineering
**********************************************************************
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**********************************************************************

Reply via email to