Pat,
a few things:
- posix format your mac file path that might be the (or part) of the 
issue
- check that a forward slash is the correct delimiter for the source 
path (PCs use backslash '\')
- I would examine the source path and look for a colon (':' or '\') as 
the directory marker.
 -- if you need to insert a backslash character as your directory 
delimiter you need to use 2 backslashes as 4D uses backslash as an 
escape character so your source path would look like this:
$filepath:=$hostpath+"\\"+$atDldFileNames{$i} // = hostpath\filename
  

hope any of this helps
Chip
On Fri, 20 Apr 2018 13:39:15 +0100, Pat Bensky via 4D_Tech 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
> **********************************************************************
---------------
Gas is for washing parts
Alcohol is for drinkin'
Nitromethane is for racing 
**********************************************************************
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