RobotStudio event

How to access hd0a file by PC applicatin

Hello, 
I want to access (read ,write,delete) files which stored hd0a\XA1 folder via PC SDK or webservice,is it possible?Now I can only access hd0a\system\home...

Thanks.

Comments

  • Does anyone have such experience? :(
  • You can use class filesystem. Example of my request:
    [CODE]
    controller.FileSystem.GetDirectory("ctrl:(BACKUP)$/" + backupDir, "D:\\Backup", true);
    [CODE/]
    If you want to access root-directory, change "ctrl:(BACKUP)$/" + backupDir to "ctrl:/hda0".
    This is working, but not the path2: "D:\\Backup", I hadn't figured out why, by now.

  • Hello derWestermann,

    Can you please show screenshots or a manual reference that says that you can access path "ctrl:/hda0"?
    I have not been able to find such source nor was I able to access anything below the HOME directory on my controller.

    Thanks!

    Maxim Riabichev
    PC Software Support Engineer
  • As I mentioned in Thread PC SDK 2021.3 FileSystem.GetDirectory

    This way, it works:

    [CODE]
                                controller.Backup("(BACKUP)$/" + backupDir);

                                do
                                {
                                    this.Cursor = Cursors.WaitCursor;
                                    System.Threading.Thread.Sleep(200);
                                    this.Cursor = Cursors.Default;
                                } while (controller.BackupInProgress);

                                controller.FileSystem.RemoteDirectory = "/hd0a";

                                string recDir = "D:\\Backup\\" + backupDir;
                                string sendDir = "/BACKUP/" + backupDir;

                                controller.FileSystem.GetDirectory(sendDir, recDir);
    [CODE/]

  • Great, thanks!

    Maxim Riabichev
    PC Software Support Engineer
  • You can use class filesystem. Example of my request:
    [CODE]
    controller.FileSystem.GetDirectory("ctrl:(BACKUP)$/" + backupDir, "D:\\Backup", true);
    [CODE/]
    If you want to access root-directory, change "ctrl:(BACKUP)$/" + backupDir to "ctrl:/hda0".
    This is working, but not the path2: "D:\\Backup", I hadn't figured out why, by now.

    Thanks for your post.Do you mean that as long as I did the backup to hda0,I can access other files or folders at hda0 besides system\home?Just like an activation? :D 
  • Hello derWestermann,
    I change "ctrl:(BACKUP)$/" + backupDir to "ctrl:/hda0",but the vs throw exception:”parameter name: path2 “ ,why is this?