copy *.csv files from T12B to Windows 7

A forum devoted to the discussion of all topics having to do with scripting and other advanced programming using iX Developer.
Post Reply
PatrickGr
Posts: 1
Joined: Wed May 07, 2014 7:09 am

copy *.csv files from T12B to Windows 7

Post by PatrickGr »

Hy,
i have a problem with sharing *.csv files from the DataLogger!
I want to copy the *.csv file that has been generated to a server on Windows 7!

\Flashdrive\Project\project files\DatabaseExport\Data Loggers\Datalogger.csv
-->
for example: \\Servername\\name\\Datalogger.csv

Everytime i get "IOException"!

How can i do that with script to have permission to copy files between WinCE6.0 an Win7?
______________________________________________________________

My Code:

void Button12_Click(System.Object sender, System.EventArgs e)
{
try
{
string sourcePath = @"FlashDrive\Project\project files\DatabaseExport\Data Loggers\DataLogger1.csv";

string destPath = @"\\servername\\name\\DataLogger1.csv";

File.Copy(sourcePath, destPath);
}
catch (IOException ex)
{
MessageBox.Show(ex.Message);
}
}

User avatar
Russ C.
Posts: 213
Joined: Thu Nov 16, 2017 3:32 pm
Contact:

Re: copy *.csv files from T12B to Windows 7

Post by Russ C. »

It looks like you're missing the beginning slash "\" in the source path:

Did you already try to change:

Code: Select all

string sourcePath = @"FlashDrive\Project\project files\DatabaseExport\Data 
To:

Code: Select all

string sourcePath = @"\FlashDrive\Project\project files\DatabaseExport\Data 
Best regards,

Russ
(801) 708-6690
Technical Support
Contact Us

Beijer Electronics AB
http://www.beijerelectronics.us

Post Reply