relativepath, conformpath strange probleme

djlbe's icon

hi everyone !

Well first i must precise i'm on PC and on the last version of max 6 available [6.1.1] , I'm trying to use [openfolder] and folder object and as I see in all max exemple they use 'relativepath' but! when I use for exemple this path 'c:/tmp/' that what [opendialog fold] output directly, passing by the [relativepath] object I get absolutly the same path, not seems really relative , a normal thing ? so I send it to the folder object before a [umenu] and then the folder object only show me 5 files , there is much than 100 files in that directory so I don't understand, could someone can help me cause i feel stupid i've searched everywhere it's seems I'm the only one

++

djlbe's icon

bump no one could help me on this?

djlbe's icon
Max Patch
Copy patch and select New From Clipboard in Max.

Here is a patch with the issue explained, what did I'm doing wrong cause it's seems a bit too simple for being a max bug

Chris Muir's icon

relativepath is only useful for things in the Max application path, I think. It doesn't generate relative paths from where your patcher is stored. I always manage paths myself, using things like the path message to thispatcher, strippath, regexp, etc.

What are you trying to accomplish, exactly?

djlbe's icon

Well that's a long project for treating sequences of files, Png in my case, for recognize automatically differents sequences in a folder,

Example with a folder containing these files :

'Apple0001.png'
'Apple0002.png'
'Apple0003.png'
'Apple0004.png'
'Apple0005.png'
'Banana - 1.png'
'Banana - 2.png'
'Banana - 3.png'
.... etc
'Banana - 450.png'

The result expected is to got a little umenu containing 'Apple' and 'Banana - ' after select this folder.but for the moment my main prob is that I can't list all these file into a umenu by using this :

[Opendialog fold]
|
[relativepath]
|
[folder]

That doesn't work and I don't understand why.

If that's not what it should be done for that there is at least an error in the references of MaxMsp :

that's a bit boring because I've already done 75% of the work which aren't the most easy and I block on this stupid stuff. :( heeelpp

Chris Muir's icon
Max Patch
Copy patch and select New From Clipboard in Max.

I guess I'm still not sure what your issue is. Here's a snippet that does some basic path manipulation.

djlbe's icon

Well so if I select a folder like my 'c:tmp' folder containing about 50 files, umenu show me only 2 files from it

Well I definitly think this is a maxmsp bug I've cause it still doesn't work on my pc, I will contact them with the issue.

Thank you for you help

Chris Muir's icon
Max Patch
Copy patch and select New From Clipboard in Max.

What have you set the folder object's types to? Here's a modification of the above patch that sets an empty types array with loadbang. On my system (Mac) it shows everything in a folder (including sub-folders which granted is sort of silly)

djlbe's icon

pfff that was stupid, ok it works now, but why folder object don't initialise with 'types' directly ? I was sure that was me -_- akward