Move file over FTP from Navision.

eromeineromein Member Posts: 589
Hi,

Does anybody have any experience with copying files from a local HD to an ftp site from within Navision?

Off course I don't want any login ids or password to be visible anywhere.

Cheers,

Emiel Romein
"Real programmers don't comment their code.
If it was hard to write, it should be hard to understand."

Comments

  • ta5ta5 Member Posts: 1,164
    I once used a tool (unfortunately I have forgotten its name) that maps any ftp site to a drive letter. Then you can use any operation simililar to real drives.
    Regards
    Thomas
  • DenSterDenSter Member Posts: 8,304
    I don't know the syntax for ftp, and I've forgotten exactly how it works, but you can write a *.bat file with FTP commands in Navision code and execute the file in a SHELL command.
  • Tarek_DemiatiTarek_Demiati Member Posts: 112
    A few years ago I developped an FTP Scheduler that I've
    called "Cute FTP Scheduler" (because it uses to the Cute FTP API), this tool perform around 1000 downloads/upload a days (to the subsidiaries, outsource Warehouse, shippers and various other trading partners)

    This tool is in production since 2003 and until very recently
    the company I was working for was still using it.

    http://www.mbsonline.org/forum/topic.as ... s=cute,ftp
  • flfl Member Posts: 184
    Hi Emiel,

    I bought a component (xceed data manipulation suite) at http://www.xceedsoft.com/products/DMS/index.aspx to solve this problem. You can do a lot more then only ftp send and receive but also zip, unzip,...

    The code I used:

    ftp automation 'Xceed FTP Library v1.1'.XceedFtp


    //get files by ftp
    CREATE(ftp);
    ftp.ServerAddress('ftp.techdata.be');
    ftp.UserName('EDI00xxxxxx');
    ftp.Password('HereYourPassword');
    ftp.Connect();
    ftp.ReceiveFile('/vip/pricelists/txt/bebat.zip',0,'c:\hsc\bebat.zip');
    ftp.Disconnect();
    CLEAR(ftp);

    It works great for more then a year on daily base.

    Regards,


    Francois
    Francois
    Consultant-Developper

    http://www.CreaChain.com
  • millyberlinmillyberlin Member Posts: 2
    fl,
    Thank you for the hint!

    seems to be a nice Automation.
    How can besolved to download several files and delete them after?

    xFTP.ReceiveMultipleFiles('*.dat','C:\Temp\',FALSE) can download all files,

    xFT.DeleteFile ('*.dat')

    returns a an error "File can nor be opened by ftp server".

    regards

    Milly
  • ara3nara3n Member Posts: 9,255
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • millyberlinmillyberlin Member Posts: 2
    Thanx ara3n,

    I saw this post yet. It's a nice way, I'll try it.

    Milly
  • wwestendorpwwestendorp Member Posts: 178
    An other solution to do this is via a script and Windows Sceduler

    Rem Script Start
    open FTP Adress (Without FTP)
    Account
    Password
    lcd Target Pathascii
    get Data.txt
    close
    quit
    REM Script End

    Save that script intio a Script.src File


    Create a sceduled Task Liker c:\windows\ftp.exe –v –s:"Path to Script.src“

    This will do your Job :P
Sign In or Register to comment.