Problem with Exec and ">"
Posted
#1
(In Topic #112)
Regular

find "/home/pi/Music" -type f -iname "*.mp3" -o -iname "*.ogg" -o -iname "*.wma" > "/home/pi/Music/playlist"
…which works in a terminal, I can successfully use Shell like this in Gambas:-
Code (gambas)
- Shell "find /home/pi/Music -type f -iname *.mp3 -o -iname *.ogg -o -iname *.wma > /home/pi/Music/playlist"
…but I can't get the syntax right using Exec. This works:-
…but changing the last bit to:-
"*wma",">", "/home/pi/Music/playlist"]
…gives me an error: "find: paths must precede expression: >"
So it looks like I have a problem with the re-direct operator ">"
Can someone put me out of my misery?
Posted
Guru

Posted
Regular

cogier said
The redirect '>' is a terminal command. It can only be used with Shell…
Thanks cogier.
I should have gone through the documentation more carefully, as its mentioned here: /doc/shellexec - Gambas Documentation
Posted
Regular

Posted
Guru

1 guest and 0 members have just viewed this.


