Forums > Jitter

wildcards in filepaths?

March 2, 2013 | 6:41 pm

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.

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

– Pasted Max Patch, click to expand. –


tep
March 3, 2013 | 5:13 am

have a look at combine or regexp


March 3, 2013 | 6:35 am

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
March 3, 2013 | 12:15 pm

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


March 3, 2013 | 5:06 pm

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


March 3, 2013 | 8:06 pm

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
March 4, 2013 | 4:04 am

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


March 4, 2013 | 7:45 pm

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


Viewing 8 posts - 1 through 8 (of 8 total)