Ftp component for ftp from navision ?

Anybody knows a good ftp component for ftp from navision ?

I don’t need any interface or anything as the commands will be programmed in navision and I just need simple commands where I of course also will be able to see if the transfer is successful.

I have looked at cute ftp but seems like overkill when I don’t need the user interface.

Hi!

Well, of course you could use the SHELL command to use som command-line features … but I would recommend CuteFTP …

Because that’s not just a pretty good FTP client for Windows (I don’t think it overkills), but you could also use as Automation Control within NAV without the GUI!!! Here you just could simply use the features you really need. We have quite good experinces with this utility; I don’t share your concerns …

Here the codeunit we use for FTPing with CuteFTP - I think that’s pretty simple:

InitFTP()
CREATE(FTP_Control);

SetRemoteHost(RemoteHost : Text[30])
FTP_Control.Host(RemoteHost);

SetRemotePort(RemotePort : Integer)
FTP_Control.Port(RemotePort);

SetUser(User : Text[30];Password : Text[30])
FTP_Control.Login(User);
FTP_Control.Password(Password);

SetLocalFolder(LocalFolder : Text[250])
FTP_Control.LocalFolder(LocalFolder);

SetRemoteFolder(RemoteFolder : Text[250])
FTP_Control.RemoteFolder(RemoteFolder);

SetLocalFile(LocalFile : Text[250])
FTP_Control.LocalFolder(LocalFile);

SetLocalFilterInclude(LocalFilterInclude : Text[250])
FTP_Control.LocalFilterInclude(LocalFilterInclude);

SetRemoteFilterInclude(RemoteFilterInclude : Text[250])
FTP_Control.RemoteFilterInclude(RemoteFilterInclude);

SetLocalFilterExclude(LocalFilterExclude : Text[250])
FTP_Control.LocalFilterExclude(LocalFilterExclude);

SetRemoteFilterExclude(RemoteFilterExclude : Text[250])
FTP_Control.RemoteFilterExclude(RemoteFilterExclude);

CreateLocalFolder(LocalFolder : Text[250])
FTP_Control.CreateLocalFolder(LocalFolder);

CreateRemoteFolder(RemoteFolder : Text[250])
FTP_Control.CreateRemoteFolder(RemoteFolder);

LocalRename(FromLocalFile : Text[250];ToLocalFile : Text[250])
FTP_Control.LocalRename(FromLocalFile, ToLocalFile);

RemoteRename(FromRemoteFile : Text[250];ToRemoteFile : Text[250])
FTP_Control.RemoteRename(FromRemoteFile, ToRemoteFile);

LocalRemove(LocalFile : Text[250])
FTP_Control.LocalRemove(LocalFile);

RemoteRemove(RemoteFile : Text[250])
FTP_Control.RemoteRemove(RemoteFile);

LocalExists(LocalFile : Text[250]) : Boolean
LocalExists := FTP_Control.LocalExists(LocalFile);
EXIT(LocalExists = -1);

RemoteExists(RemoteFile : Text[250]) : Boolean
RemoteExists := FTP_Control.RemoteExists(RemoteFile);
EXIT(RemoteExists = -1);

Connect()
FTP_Control.Connect();

IsConnected() : Boolean
Connected := FTP_Control.IsConnected();
EXIT(Connected = -1);

Disconnect()
FTP_Control.Disconnect();

Download()
FTP_Control.Download();

Upload()
FTP_Control.Upload();

Close()
FTP_Control.Close();

TestConnection(Host : Text[30];Port : Integer;User : Text[30];Passwd : Text[30])
InitFTP();
Window.OPEN(‘Testing FTP connection …’ +
#1############################’);
SetRemoteHost(Host);
SetRemotePort(Port);
SetUser(User, Passwd);
Window.UPDATE(1, STRSUBSTNO(‘Connect to %1:%2 …’, Host, Port));
Connect();
YIELD;
SLEEP(1000);
Successful := IsConnected();
Window.UPDATE(1, STRSUBSTNO(‘Successful: %1’, Successful));
YIELD;
SLEEP(1000);
Window.UPDATE(1, ‘Disconnect …’);
Disconnect();
YIELD;
SLEEP(1000);
Window.CLOSE;
Close();
YIELD;
CLEARALL;
IF Successful THEN
MESSAGE(STRSUBSTNO(‘Could connect to %1:%2’, Host, Port))
ELSE
ERROR(STRSUBSTNO(‘Could not connect to %1:%2’, Host, Port));

Regards,

nice :slight_smile:
I have numerous of ideas now :slight_smile:

Glad you like cute-ftp I might end up using it.

I just have following concerns:

  • Using citrix environment I need to purchase license to all load balancing servers even though only few users will be performing ftp (however the license is not that expensive)
    • But if I expand my citrix farm I might not be able to purchase license to the same version any longer
    • Cute ftp tell’s me they don’t support citrix environment and that I will not be able to purchase license to older version in the future if I expand the citrix farm

Looks good!

Another possibility is to map the ftp site to a drive with some software. This way, ftp is fully transparent to navision.

Regards

Thomas

Hi,

Really sorry if I need to reopen this topic as I am quite new to this “FTP Component”. I have installed it and it has good UI. However, when I tried to “see” this via Navision and define a variable of type “Automation”, I cannot find this component as part of Automation from within NAV. Anything wrong with my installation? Actually what I am looking for is just an FTP component that can be programmed from within NAV, even without fancy interface.

Anybody knows also any other freeware of FTP component in the format of OCX?

Thanks if anybody can help.