----- Original Message ----- > From: Mathieu Bouchard <[email protected]> > To: adam sanches <[email protected]> > Cc: [email protected] > Sent: Thursday, September 15, 2011 1:51 AM > Subject: Re: [PD] Selecting random wavefile from folder without knowing the > names > > Le 2011-09-14 à 22:14:00, adam sanches a écrit : > >> Hi, how can i select a random wavefile from a folder withouth knowing the > names of the files in my folder? >> >> how can i read all the files names in a folder and then select one? which > would be the best way of doing this? > > [hcs/folder_list] then [list length] then [random] then [list split] then $1.
You were pwned by a misnomer. [folder_list] outputs each file/dir as a symbol, so you'd need to accumulate a list from its output. -Jonathan > > _______________________________________________________________________ > | Mathieu Bouchard ---- tél: +1.514.383.3801 ---- Villeray, Montréal, QC > > _______________________________________________ > [email protected] mailing list > UNSUBSCRIBE and account-management -> > http://lists.puredata.info/listinfo/pd-list > _______________________________________________ [email protected] mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
