# Upload files with magic files, and log locations of /usr/bin/logger

**URL:** <https://forum.universal-robots.com/t/upload-files-with-magic-files-and-log-locations-of-usr-bin-logger/805>\
**Category:** Technical Questions\
**Tags:** error-code, magic-files\
**Created:** [May 23, 2017, 1:39pm UTC](https://forum.universal-robots.com/t/upload-files-with-magic-files-and-log-locations-of-usr-bin-logger/805 "2017-05-23T13:39:07Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![anon5205111](https://avatars.discourse-cdn.com/v4/letter/a/fbc32d/32.png) [@anon5205111](https://forum.universal-robots.com/u/anon5205111)\
**Post date:** [May 23, 2017, 1:39pm UTC](https://forum.universal-robots.com/t/upload-files-with-magic-files-and-log-locations-of-usr-bin-logger/805/1 "2017-05-23T13:39:07Z")

</div>

Hi.  
I am having some troubles uploading files to my robot.

The script does not execute on my robot (3.3.4.310), nor when being ran on my simulator by running “sh upload\_files.sh”. When executed on the simulator, I get the log message “no mountpoint supplied” given by the start of the program below. When being ran directly on the robot via ssh with the same command (“sh upload\_files.sh”), I cannot find any log messages.

```
"LOGGER="/usr/bin/logger"
TAG="-t '$(basename $0)'"

if ["$1" = ""] ; then
    $LOGGER -p user.info $TAG "$0: no mountpoint supplied, exiting."
    exit 1 ; fi

MOUNTPOINT="$1""

```

In the simulator, the log messages are presented in /var/log/syslog. I cannot seem to find the location of this log on the physical robot.

My questions are:

1. Is there some bugs in the magic files?
2. Where is the log destination on the robot? It would be useful to know, since I need to make some edits to my magic files.

Best regards,  
Lars

---

<div class="post-metadata">

**Author:** ![ajp](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.universal-robots.com/ajp/32/471_2.png) [@ajp](https://forum.universal-robots.com/u/ajp)\
**Post date:** [May 24, 2017, 1:23am UTC](https://forum.universal-robots.com/t/upload-files-with-magic-files-and-log-locations-of-usr-bin-logger/805/2 "2017-05-24T01:23:15Z")

</div>

Hi, Looks like when the controller executes the magic file automatically, it passes the mount point of the USB (location of the magic file) as a command line argument to the shell script (stored in $1). So it won’t get that if you just use the sh command used above.

You can get some debug info back out of the sh command using the -x option (verbose mode).

Assuming your current directory contains the magic file, below is one example of how you can pass the location of the file (mount point) to the script:

```
pwd | xargs sh -x upload_files.sh

```

The log files will be copied to the directory containing the magic file.

Magic files are designed to run on the real robot, and as the user names/file locations are different under URSIM you’d have to do some additional tinkering to get it to work there.

Hope this helps you to move forward.

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.universal-robots.com/system/32/1_2.png) [@system](https://forum.universal-robots.com/u/system)\
**Post date:** [January 22, 2021, 11:03pm UTC](https://forum.universal-robots.com/t/upload-files-with-magic-files-and-log-locations-of-usr-bin-logger/805/3 "2021-01-22T23:03:30Z")

</div>

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.
