Data base file to be copied from IXT12B to PC using FTP

A forum devoted to the discussion of all topics having to do with scripting and other advanced programming using iX Developer.
Post Reply
Tushar123
Posts: 10
Joined: Mon Sep 17, 2012 12:38 am

Data base file to be copied from IXT12B to PC using FTP

Post by Tushar123 »

Dear All

I have T12B HMI and need to copy data base file (.sdf) from T12B to PC using FTP at set interval base.

Any one have tried before.

Can i have sample program

Regards

Tushar

JohnCZ
Posts: 73
Joined: Wed Jun 27, 2012 1:17 am
Location: CZ
Contact:

Re: Data base file to be copied from IXT12B to PC using FTP

Post by JohnCZ »

Hi,

Why you want send the database.sdf through FTP?? If you want through FTP You need to script your own FTP client and it's not so easy.

If the PC and T12B is on the same network just used FileCopy method and add using System.IO.

using System.IO;


Exampl for Button

void Button_Click(System.Object sender, System.EventArgs e)
{
try
{
File.Copy(@"\FlashDrive\Project\database.sdf", "location, where you want to have database file in PC. In some times is better to used IP");
}
catch (Exception ex)
{
Console.WriteLine(ex);
}
}


BR
Jan

Post Reply