Wildcard in pathname


#1

Hello,

I would like to collect some sounds that are stored in a directory. Here, anyone who starts with “glou”. I tried to use wildcard * :

(
d.add(\glou01 ->
	PathName("~/son/Sons/Percussif/glou01/glou*.*").entries.collect({
		arg sf;
		Buffer.read(s, sf.fullPath);
	});
);

But it does not seem to work… Is it possible?


#2

Try:

"~/Desktop/*".pathMatch.postln;

#3

Thank you. From your indications, I managed to do something that works:

(
d = Dictionary.new;
d.add(\glou01 ->
	"~/son/Sons/Percussif/glou01/glou01*".pathMatch.collect({
		arg sf;
		Buffer.read(s, sf);
	});
));