# Transfer UR5 program to script

**URL:** <https://forum.universal-robots.com/t/transfer-ur5-program-to-script/29969>\
**Category:** URScript\
**Created:** [August 15, 2023, 5:56am UTC](https://forum.universal-robots.com/t/transfer-ur5-program-to-script/29969 "2023-08-15T05:56:04Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![anon30700803](https://avatars.discourse-cdn.com/v4/letter/a/a88e57/32.png) [@anon30700803](https://forum.universal-robots.com/u/anon30700803)\
**Post date:** [August 15, 2023, 5:56am UTC](https://forum.universal-robots.com/t/transfer-ur5-program-to-script/29969/1 "2023-08-15T05:56:04Z")

</div>

Hello, I have a program on my UR5 that I want to translate to script. Is there any way I can do that directly or I need to rewrite the program line by line?

---

<div class="post-metadata">

**Author:** ![efn](https://avatars.discourse-cdn.com/v4/letter/e/35a633/32.png) [@efn](https://forum.universal-robots.com/u/efn)\
**Post date:** [August 15, 2023, 10:02am UTC](https://forum.universal-robots.com/t/transfer-ur5-program-to-script/29969/2 "2023-08-15T10:02:18Z")

</div>

Load the program in the UR and play it. The robot should then create a .script file in the /programs folder beside with the .urp files. 🙂

---

<div class="post-metadata">

**Author:** ![anon30700803](https://avatars.discourse-cdn.com/v4/letter/a/a88e57/32.png) [@anon30700803](https://forum.universal-robots.com/u/anon30700803)\
**Post date:** [August 15, 2023, 10:07am UTC](https://forum.universal-robots.com/t/transfer-ur5-program-to-script/29969/3 "2023-08-15T10:07:10Z")

</div>

Do I need to connect the robot or I can just power the controller box and use the teaching pedant?

---

<div class="post-metadata">

**Author:** ![efn](https://avatars.discourse-cdn.com/v4/letter/e/35a633/32.png) [@efn](https://forum.universal-robots.com/u/efn)\
**Post date:** [August 16, 2023, 4:08am UTC](https://forum.universal-robots.com/t/transfer-ur5-program-to-script/29969/4 "2023-08-16T04:08:09Z")

</div>

The robot compiles your program and generates the script file when you execute the program. So you will need a robot arm connected to the controller. 🙂  
Alternatively, you can load the program in the offline simulator and execute it there.
