wildcards in filepaths?

karl krach's icon

hi,
noob question, sorry - but how the heck do i specify a wildcard in a filepath? i tried "*" but that does not do the trick.

Max Patch
Copy patch and select New From Clipboard in Max.

background: i want to read .jxf-file sequences from disk which have a name like this: "frame00004_*.jxf" - where the "*" is a number i use to handover metadata. below i attached a short patch to illustrate what i am trying to achieve.
thanks a lot for help!
k

tep's icon

have a look at combine or regexp

karl krach's icon

well, this is what i do (combine), see patch... so how does it work?
i think the problem is not the creation of the filepath symbol but its interpretation by the read-message of jit.matrix...?
k

tep's icon

Sorry Karl i didn't have a MaxMsp to check yesterday

Well just replace * by an int !

combine r1:/ frame 0 _ i .jxf @padding 0 0 5 @triggers 2

karl krach's icon

hey tep, thanks for getting back to me!
i tried with "i" but that does only work when i do know which number i replace the integer with... i guess i have to rephrase my problem: "how do i place a wildcard in a read message, sent to a matrix?"
like, how do i tell the matrix to read a file of which i do not know it's precise name, but only the beginning like eg. "frame0001*"?
k

Joshua Kit Clayton's icon

We don't support filename wildcards, so you'll need to use something like the folder object to grab all the names and pass through the ones that match via regexp or in JS or some other similar strategy. Sorry for the inconvenience, but maybe if you search the forums or online someone has an example that would be useful.

tep's icon

But would there be no solution with regexp ? Matching as many characters between frameXXXX***** until .jxf ?

karl krach's icon

ah!
thanks a lot for the clarification! i thought this would be something really simple and i just don't get it...
searching the whole folder is not really feasible in my case, it's a large image sequence and there are 90.000 files. i guess i just have to figure out another way to save my metadata… thanks though!
k