Shell Command

Hello All,

I am trying to execute a shell command in Xojo. On the command line it works.

./photo /Users/gb/Pictures/birds/ test2.usdz

On Xojo I tried this code.
cmd ="/Users/gb/Pictures/photo /Users/gb/Pictures/birds/ test2.usdz"
sh.execute(cmd)

./photo is the program I am executing, the second parameter is the full path to a directory with bird images, the last parameter is the output name of the file that will be created.

Thanks All

How are you configuring your shell?

Try this to see where you end up:

sh.Mode = 1
sh.Timeout = -1 // for Windows
sh.Execute(cmd)
Do
  sh.Poll
Loop Until Not sh.IsRunning
If sh.ErrorCode <> 0 Then
  // handle error / exception
End If

And… it failed or not? You got an error code?