NAV FTP Client v1.1
Automation control for Dynamics NAV to Upload and Download files from FTP. Track progress within NAV with a dialog window.
New: Set passive mode, Delete file on FTP and list FTP directoty.
Includes setup.exe for installation.
Ver 1.1
New functions:
DeleteFileOnFTPServer()
ListFTPDirectory()
GetDirectoryList()
New Property
Passive
Sample code:
MESSAGE(NAVFTP.DeleteFileOnFTPServer('home/database.fdb'));
NoOfLines := NAVFTP.ListFTPDirectory('home',FALSE);
IF NoOfLines > 0 THEN
FOR i := 1 TO NoOfLines DO
MESSAGE(NAVFTP.GetDirectoryList(i));
I have been looking for an FTP solution without the use of the SHELL command in NAV.
As usual, Mibuso comes to the rescue .
I have been playing around with your solution for a bit now, but the UploadFile function returns an error. The function GetDirectoryList works fine, so the FTP connection is definitly there.
Attached you'll find a screenshot of the error.
Raw translation of the error:
"Cannot convert an object of type System.ComponentModel.AsyncOperation to type UploadBitsState."
I am running this on Windows 7 - 64 bit, in NAV 2009 SP 1.
Kind regards
Marten
EDIT: The problem was a faulty 'FROM' parameter. Of course 'C:\test,txt' does not work. It had to be 'C:\test.txt'...
I think that passive mode doesn't work. When I set passive(True) then Automation return OK but server retur error "Entering Passive Mode(37,157,196,165,201,211)".
Comments
Automation control for Dynamics NAV to Upload and Download files from FTP. Track progress within NAV with a dialog window.
New: Set passive mode, Delete file on FTP and list FTP directoty.
Includes setup.exe for installation.
Ver 1.1
New functions:
DeleteFileOnFTPServer()
ListFTPDirectory()
GetDirectoryList()
New Property
Passive
Sample code:
http://www.mibuso.com/dlinfo.asp?FileID=1449
Discuss this download here.
I have been looking for an FTP solution without the use of the SHELL command in NAV.
As usual, Mibuso comes to the rescue .
I have been playing around with your solution for a bit now, but the UploadFile function returns an error. The function GetDirectoryList works fine, so the FTP connection is definitly there.
Attached you'll find a screenshot of the error.
Raw translation of the error:
"Cannot convert an object of type System.ComponentModel.AsyncOperation to type UploadBitsState."
I am running this on Windows 7 - 64 bit, in NAV 2009 SP 1.
Kind regards
Marten
EDIT: The problem was a faulty 'FROM' parameter. Of course 'C:\test,txt' does not work. It had to be 'C:\test.txt'...
It run fine.
I need a RENAME function because when COPY the LS return it.
I installed the code on a codeunit, and to run it gives me authentication error. The username and password are correctly spelled ...
Greetings.
I think that passive mode doesn't work. When I set passive(True) then Automation return OK but server retur error "Entering Passive Mode(37,157,196,165,201,211)".
It is supposed to take 2 paramters, but will only accept one.
Anyone tried this?
i've tried to download a file from our FTP Site, but (without Errors) the file is empty (0 bytes)
can someone help?