# using shell script

**URL:** <https://forum.xojo.com/t/using-shell-script/26930>\
**Category:** Getting Started\
**Created:** [September 28, 2015, 2:45pm UTC](https://forum.xojo.com/t/using-shell-script/26930 "2015-09-28T14:45:11Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shawn\_Brady](https://forum.xojo.com/user_avatar/forum.xojo.com/shawn_brady/32/1922_2.png) [@Shawn\_Brady](https://forum.xojo.com/u/Shawn_Brady)\
**Post date:** [September 28, 2015, 2:45pm UTC](https://forum.xojo.com/t/using-shell-script/26930/1 "2015-09-28T14:45:11Z")

</div>

this is not working. what do I have to do to get this command to work in XOJO.

![](https://dl.dropboxusercontent.com/u/2159257/shell.png)

---

<div class="post-metadata">

**Author:** ![Paul\_Lefebvre](https://forum.xojo.com/user_avatar/forum.xojo.com/paul_lefebvre/32/3152_2.png) [@Paul\_Lefebvre](https://forum.xojo.com/u/Paul_Lefebvre)\
**Post date:** [September 28, 2015, 3:32pm UTC](https://forum.xojo.com/t/using-shell-script/26930/2 "2015-09-28T15:32:50Z")

</div>

You should be more specific about “not working” so that people can help you better. I’m going to guess you are getting a compiler error because the execute parameter requires a string and your text is not enclosed in quotes. And for concatenation, Xojo uses “+”, not “&”.

I recommend creating your command string separately so you can easily check in the debugger to make sure it is correct.

```auto
Dim cmd As String = "do shell script ""open 'volumes/Active_Projects_A-D/FEATURES/""" + proj_code.Text + "'*"
```

Also, it is better to put the actual code in the post (use the code tag to format it) rather than a screenshot so we can quickly copy/paste to test.

---

<div class="post-metadata">

**Author:** ![Axel\_Schneider](https://forum.xojo.com/user_avatar/forum.xojo.com/axel_schneider/32/465_2.png) [@Axel\_Schneider](https://forum.xojo.com/u/Axel_Schneider)\
**Post date:** [September 28, 2015, 4:30pm UTC](https://forum.xojo.com/t/using-shell-script/26930/3 "2015-09-28T16:30:47Z")

</div>

OSX?

'volumes/Active\_Projects\_A-D/FEATURES/…

should it not be '/Volumes/Active\_Projects\_A-D/FEATURES/… ?

---

<div class="post-metadata">

**Author:** ![Norman\_P](https://forum.xojo.com/letter_avatar_proxy/v4/letter/n/858c86/32.png) [@Norman\_P](https://forum.xojo.com/u/Norman_P)\
**Post date:** [September 28, 2015, 4:39pm UTC](https://forum.xojo.com/t/using-shell-script/26930/4 "2015-09-28T16:39:46Z")

</div>

This really looks like an AppleScript that is being sent to an OS shell which isn’t going to work

You’d have to run this in a shell using OSASCRIPT

Dim cmd As String = “do shell script ““open 'volumes/Active\_Projects\_A-D/FEATURES/””” + proj\_code.Text + “’\*”

dim mshell as new shell  
mshell.execute("osascript " + cmd)

not sure the quoting is right though

---

<div class="post-metadata">

**Author:** ![system](https://forum.xojo.com/uploads/default/original/1X/455b4dcc0e61630e9f81940004ddffa49c432a46.png) [@system](https://forum.xojo.com/u/system)\
**Post date:** [October 29, 2020, 5:58pm UTC](https://forum.xojo.com/t/using-shell-script/26930/5 "2020-10-29T17:58:37Z")

</div>


