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.5K RobotStudio
- 396 UpFeed
- 18 Tutorials
- 13 RobotApps
- 297 PowerPacs
- 405 RobotStudio S4
- 1.8K Developer Tools
- 250 ScreenMaker
- 2.8K Robot Controller
- 316 IRC5
- 61 OmniCore
- 7 RCS (Realistic Controller Simulation)
- 800 RAPID Programming
- AppStudio
- 3 RobotStudio AR Viewer
- 18 Wizard Easy Programming
- 105 Collaborative Robots
- 5 Job listings