Folder/ file path stuff
I’m currently using [opendialog fold] to load some umenus with file names. What I’d like to do is split the folder into a list of all the individual file names before going to the umenus. How do I got about doing this?
Have a look at [folder].
That doesn’t seem to be doing the trick. It works fine with the [folder] going into an umenu, but with a set up like this
<code>-- Pasted Max Patch, click to expand. --Copy all of the following text. Then, in Max, select New From Clipboard.----------begin_max5_patcher---------- 457.3ocyUssSCCCC841uhn7bYpIqsrxa7cflPoqgsf5RpRxFCP7uSiSlFice TA7xprii8wGeh26wQ3J0JtAitC8.JJ583nHvkyQTvNBOmsZRCy.ggmyMF1TN NwelkuxB9su11knf2mTRqQ7F2cBgNHM3VtXtP1vsPlnAmsL6jYB4zG07IVOR xFda2cPjR3yvRvXzfTz3vcD0PMUUOeS9WqojMGpI9dsf0f2TV0B655RBd8tb v1WTLFM1cxGwwteRNS9nK4Ub8kz3jC23CGk65UZI7IOELR2eiSJtzNeCiq6h 1x0OxkrpF3doGhUDRKNAgqXxoWGA8MAyOTZPKGsCCcHoAI6OVaTsvZUR7kJB ndAed15w+gEAEWXeb8iQI+ktBtyy9mTM08m7224zL3ceF4XcN8ZU+6NaS7p7 9jVTsbYcGTTSQNFpe4mvdwR5QWOzq7yt5Fnl3Fg76+8Afam+sYMiZgdx5TFV bi1f7ZtwJjLqn68xlXnaEyLQcMW90sU0BiaAFz0o6c5ctno3LPC4WCMj+Ubi qRjSwME+pv4jiprsv74CGurl01tjqMgbBHo6Y+yJsyrHALERuIjQrluTrN97 XW19H9S.5q9ItB -----------end_max5_patcher-----------
It just seems to be outputting one element of the list of files and how many files are in the folder. What I want is the whole list of files so I can split them up individually.
yes, because it outputs all the elements sequentially, not at once. you should rahter plug a [print] at the outlet of an object you don’t know that you want to test, not a message box, a message box will only display the last element that it has received.
<code>-- Pasted Max Patch, click to expand. --Copy all of the following text. Then, in Max, select New From Clipboard.----------begin_max5_patcher---------- 667.3ocyW1sbhCBEG+53SAStVc.xGZ161clc1mgc1oiCwfQ5l.YBjVqc569F .s1pXM1Ui8lD4Om.G9w4b.edfmepXEU5C9F3O.OumG34YjzBdaZ64WRVMufH Ml4yoOJRu2ensKEckxHq.oa0XYFkVqFEf1JtPvUbRI0z02qYjhs8vaJY7Bpx L7n2Xtjs1XNBOFtyVQiZeiqHp4KY77Y0z4J6ZAmn+H.JXp9ENz7DNFBtay2X GF0SUT6G3mR349f6z89xfA5GC++HRUMiq.pkLIS93RhZ1BQQFsdldhjNXEBd MYE73rJHDZXUbn8U7NX8InQIUJI4zCvwuDYxJJM62hleTPl+2eVVQqE0yRRR FulUAxeJkhgH3HDdDJTAQiWzZlC4xPxAp3wkUAGnF3TMzoZjS0XmpSbpNUqt cYWv3z4hFtYsifGtambla13KUhQPhc60jefsYFHs3wSMtnoE0sCOEPppn7Lm zBeHrlbMgE9jvBgizuhBzOCB9PTM7Biq0EfHDFj2hsJ8ubT3H7FSmM0MfvSW j8himiUjMSPcUiM3FUhcJ7MwQnnjqREVMmcsnitQkZBBmnWm1mahUld4qyj1 nTBti0c7GtkdtULe8JD89EIrgzNVf3qYz7oS7ShOq7dlt79EDKB8IHsKUQNP SHW2n51xGafu8hnmFOGF1Xr2b13dWP2LkZ82CMonod91gbS7A.85rlQkJFmn XsIK6rQeCcvNWaIKKixea0rLljjVPMTE5b2qqtydSka+Ir2bmtPmv2Yy0zal 7khMgcvaR5M1zkcJ8+dpGCbNEbl7kxaB5MuoKo33dyah6f2ze0+hthrwdVQ6 +p5AZsbyPZbj1iRuWTqaFOzzjwsMMineM8A1V6mNPOZuL3e.dSdLR. -----------end_max5_patcher-----------
That said, it’s slightly a bit tricky to use [folder] in the above patch, because unlike most of the max objects, the leftmost outlet – which is all the elements in requested folder output sequentially – comes out first, and the rightmost outlet – which is the actual size of the list – comes out last. In this patch you can’t set the size of [zl group] by the size of the list, because it so happens that if you change the size of the [zl group] it empties its content, and as the size information would come to him after the elements od the list (leftmost outlet), it would be emptied of its content.
Yeah using message boxes is a habit I’ve formed which I should get out of.
Thanks though that actually work exactly how I want.
glad to help :)
Forums > MaxMSP