Jump to content

retrieve or copy files from an SD


Navas

Recommended Posts

hi,

I want to recover the file (csv or utr) my SD.
Readfile void (string sourceFolderName, sourceFileName string, string TargetFolder, bool resumeRead, Unitronics .....)
My problem is with the string TargetFolder.
Help me please it's urgrnt

 

void bg_com_DoWork(object sender, DoWorkEventArgs e)
        {


            Ethernet eth = new Ethernet(txt_adresse_ip.Text, 20256, EthProtocol.TCP);
            PLC plc = PLCFactory.GetPLC(eth, 0);


            SD.Folder excel1 = plc.SD.Dir(SD.SdFolder.EXCEL_EXCEL1, ".csv", false, null);
            int i;
            for (i = 0; i < excel1.Files.Count; i++)
            {
                plc.SD.ReadFile(SD.SdFolder.EXCEL_EXCEL1, excel1.Files.Name, new ProgressStatusChangedDelegate(status_changed));
                tsttxt = excel1.Files.Name;
            }
            plc.SD.ReadFile(SD.SdFolder.EXCEL_EXCEL1, excel1.Files.Name, destinationFile, true, new   ProgressStatusChangedDelegate(status_changed));


        }

        void status_changed(RequestProgress requestProgress)
        {
            if (requestProgress.NotificationType == RequestProgress.en_NotificationType.ProgressChanged)
            {
                maj_progress_bar(((int)requestProgress.Percentage).ToString());
            }
        }

        delegate void Callback(string s);

Link to comment
Share on other sites

"My problem is with the string and Boolean TargetFolder resumeRead." - You don't specify what is the problem...


 


destinationFile is where to save the file in your hard drive. If it says TargetFolder then it means that it is a path where the file with be saved in.


resumeRead is used in order to resume a file, if the transfer was canceled or interrupted in the middle.


Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...