Wildcard in pathname

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?

Try:

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

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);
	});
));
1 Like