Backup path is not changed even if remotePath is

e_tip
✭
Hi, i'm developing an utility for my company to manage the robots we have,
i'm having problems with backup code :
But even if i've specified /hd0a/BACKUP as remoteDirectory my backups are always made inside HOME...
Any suggestions ?
Tia
i'm having problems with backup code :
var destinationPath = "2019_10_10"; if (!this.isConnected) { this.Connect(); } Console.WriteLine(_ctrl.FileSystem.RemoteDirectory); _ctrl.FileSystem.RemoteDirectory = "/hd0a/BACKUP"; Console.WriteLine(_ctrl.FileSystem.RemoteDirectory); <-- used this only for be sure that RemoteDirectory is changed if (!Directory.Exists(Path.Combine(localPath, DateTime.Now.ToString("dd-MM-yyyy"), Info.ControllerName))) { Directory.CreateDirectory(Path.Combine(localPath, DateTime.Now.ToString("dd-MM-yyyy"), Info.ControllerName)); } _ctrl.BackupCompleted += (object e, BackupEventArgs evt) => { Console.WriteLine("Backup over"); }; _ctrl.Backup(destinationPath);
But even if i've specified /hd0a/BACKUP as remoteDirectory my backups are always made inside HOME...
Any suggestions ?
Tia
0
Comments
-
Hello Tia,
please try the following:_ctrl.FileSystem.RemoteDirectory = _ctrl.GetEnvironmentVariable("Backup");
or_ctrl.FileSystem.RemoteDirectory = "(Backup)$";
or if you want to address the path on the controller you have to add "ctrl:":_ctrl.FileSystem.RemoteDirectory = "ctrl:/hd0a/Backup";
The two upper versions also work on the virtual controller
Best regards
Micky0
Categories
- All Categories
- 5.6K RobotStudio
- 399 UpFeed
- 20 Tutorials
- 14 RobotApps
- 301 PowerPacs
- 406 RobotStudio S4
- 1.8K Developer Tools
- 250 ScreenMaker
- 2.8K Robot Controller
- 339 IRC5
- 67 OmniCore
- 8 RCS (Realistic Controller Simulation)
- 832 RAPID Programming
- 14 AppStudio
- 4 RobotStudio AR Viewer
- 19 Wizard Easy Programming
- 107 Collaborative Robots
- 5 Job listings