Shell path syntax?

It seems so easy!

In the mac terminal ‘ls’ will list the current directory.
In Xojo ‘s.Write(“ls”)’ will do the same.
In the mac terminal ‘ls desktop’ will list the desktop directory.
But in Xojo 's.Write(“ls desktop”) ’ fails.

I know this is really basic, but the solution eludes me. What am I doing wrong?

probably because “desktop” isn’t in the same relative position in each of those circumstances

s.Execute("ls "+specialfolder.desktop.shellpath)

will work

Thanks! That’s just what I needed. I’ve done a lot of work with Xojo and Real basic, but I’ve never used shell commands before.

They can be fun, and you can create some pretty useful wrapper tools. But you have to keep in mind, and this is from the documentation: