# Backup path is not changed even if remotePath is

**URL:** <https://tech-community.robotics.abb.com/t/backup-path-is-not-changed-even-if-remotepath-is/9144>\
**Category:** Developer Tools\
**Created:** [October 10, 2019, 2:43pm UTC](https://tech-community.robotics.abb.com/t/backup-path-is-not-changed-even-if-remotepath-is/9144 "2019-10-10T14:43:15Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![e\_tip](https://avatars.discourse-cdn.com/v4/letter/e/ec9cab/32.png) [@e\_tip](https://tech-community.robotics.abb.com/u/e_tip)\
**Post date:** [October 10, 2019, 2:43pm UTC](https://tech-community.robotics.abb.com/t/backup-path-is-not-changed-even-if-remotepath-is/9144/1 "2019-10-10T14:43:15Z")

</div>

Hi, i’m developing an utility for my company to manage the robots we have,  
i’m having problems with backup code :

```auto
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

---

<div class="post-metadata">

**Author:** ![Micky](https://avatars.discourse-cdn.com/v4/letter/m/a5b964/32.png) [@Micky](https://tech-community.robotics.abb.com/u/Micky)\
**Post date:** [October 14, 2019, 4:02pm UTC](https://tech-community.robotics.abb.com/t/backup-path-is-not-changed-even-if-remotepath-is/9144/2 "2019-10-14T16:02:12Z")

</div>

Hello Tia,

please try the following:

```auto
_ctrl.FileSystem.RemoteDirectory = _ctrl.GetEnvironmentVariable("Backup");

```

or

```auto
_ctrl.FileSystem.RemoteDirectory = "(Backup)$";

```

or if you want to address the path on the controller you have to add “ctrl:”:

```auto
_ctrl.FileSystem.RemoteDirectory = "ctrl:/hd0a/Backup";

```

The two upper versions also work on the virtual controller

Best regards  
Micky
