Transferring files over FTP & SFTP protocol

This post is about transferring the file over FTP (File Transfer Protocol) & SFTP (Secured File Transfer Protocol) from Navision using WinSCP dot net library. Files can be uploaded to & downloaded from remote system.

Below is the design that i have implemented in one of our projects.

  1. FTP Setup – to configure the connection details.
  2. FTP Setup Line – to configure the methods like upload, download and file paths.
  3. FTP Log

FTP Setups:

FTP_Setup_List

FTP Setup:

You can create multiple FTP Setup for different connections.

  1. Active field can be used to Activate / Deactivate the FTP Setup.
  2. Sequence field can be used to setup the sequence in which the FTP batch job can process the FTP Setup.
  3. Connection can be tested using Test Connection.

FTP_Setup_1

FTP Setup Line:

  1. Active field can be used to Activate / Deactivate individual FTP Setup Line.
  2. Line level Sequence field can be used to setup the sequence in which Setup Line can be processed.
  3. Uploaded files can be archived & deleted using the “Archive & Delete” option.

FTP_Setup_2

Batch Job for Processing the FTP Setup.

Connection is only opened once for each & every Active FTP Setup and only Active Lines are processed based on the sequence defined in the setup.

FTP_Batch_Job

FTP Logs are created when processing the the FTP Setup . Log contains the details about the files that are Uploaded & Downloaded, connection & transfer related error’s .

FTP_Log

Batch job can be scheduled in Job Queue:

JobQueue_

Sample code can be found from  WinSCP

WinSCP Library can be downloaded from here  and the files should be copied to the Add-ins folder.

SFTP can be tested with Rebex Tiny SFT Server .

Please do let me know your suggestion on the design and share this post. Thanks

Advertisements

4 thoughts on “Transferring files over FTP & SFTP protocol

  1. Hi Divesh, Your Implementation is good.This is what we are looking for.

    Please share the objects if possible ,it would be very helpful for NAV team in saving time.

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s