FTP

I would like to control an FTP-transfer directly from within Navision Attain using an OCX. Any good ideas out there? //Lars

While an OCX ist the most elegant way, there’s another possibility to automat FTP transfer which requires less than one hour of programming: 1. Purchase CuteFTP http://www.globalscape.com/products/cuteftp/index.shtml which sells for US$40.- 2. Within Navision you can create a command-script for uploading the file(s) you need. Here’s a short example: which uploads the local file C:\Data\MyDocuments\myFileToUpload.html to host 138.190.100.111 into directory /mydirecotry/mysubdirectory

 Host 138.190.100.111
LocalDir C:\Data\MyDocuments
FilterLocal
AutoRename ON
Login Normal
User navision
Pass sapsucks
Connect
LocalCwd 
RemoteCwd **/mydirecotry/mysubdirectory**
LocalClearSelection
LocalSelect **myFileToUpload.html**
Upload
Shutdown
  1. If the script (or macro) is saved as C:\My Documents\navupload.mcr You can invoke CuteFTP passing the macro for automatic execution:
"C:\Program Files\CuteFTP\cutftp32.exe" Macro=C:\My Documents\navupload.mcr

With best regards from Switzerland Marcus Fabian

GlobalSCAPE has made a new version of CuteFTP → CuteFTPro. With this version it is possible to make a FTP-transfer directly from Navision. Example:

CREATE(CuteFTPAut);
CuteFTPAut.Host := 'reijer.nl';
CuteFTPAut.Login := 'reijer';
CuteFTPAut.Password := 'pass';
CuteFTPAut.Connect;
CuteFTPAut.LocalFolder := 'c:\';
CuteFTPAut.RemoteFolder := '/pub/';
CuteFTPAut.Upload := 'sample.txt';
CLEAR(CuteFTPAut);

Regards, Reijer Molenaar. Edited by - reijer on 2002 May 14 17:34:51

Thanks Reijer. Just what I was looking for. //Lars