wildcards in filepaths?
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!
-- Pasted Max Patch, click to expand. --Copy all of the following text. Then, in Max, select New From Clipboard.----------begin_max5_patcher---------- 601.3ocwUF0jZBCDG+Y3SwNL8oNVZR.Tvmt94nsiS.hXrPvIDs1dy8cuIAv5 ofi5Yu5LlYxxlr+2eY2jmcc7Rq2yZ7f4vWAGmmccbrlLFb5l63UQ2mURart4 kUWUwDJuIseSw1qr1WxKYMPs.VQk44R9NFPkLPPqX4PI+GLPsh2L+ahkRsIj 9GdA1e89kGYgblkfEnSrDdlOQm4yzdKLUleuRK4BVV8VgUtIcFWJKRMyQ9nd K0BkQz1j5KRNsreC1PUYq3hhERVlpEYgl0AwDyHNxNASl4ifu2sFdtcepSW+ ov98QrshKJYJKOwGE1F9usgESNnFsu0aU8NiLFew00LL4JOuDrepi9YGWRvb foSoU8epMNpesg0laddGxhahIjvoFNjDZFilYFIngQBYPjftEjfebHwVbvj. BRRRFkJbSsuFNc+MSuONELk3OSGo33dXEGdIXgGDVQ2BrBebvZMW4WQUR9d. CY5ddHLFAjYnQAmdEKZWgkcuohKRPfsWKH4RDK7AzxQtCjUwZZnEry64Xzb3 C3IPJUT7OpsCmfskRsShGALICBFx+sFupT8kyfDO+yf8RbcO3B3if4Rb3oMz 7bctpsgfH3IcETQAS1.jwQ3at.CGY6ECv3KUfEflNHHmduUX1fXeo5j2jsJ0 X+0zsodqLqOq6tQE9qTyYMJtfp30hi7wp5i7ZEOOmIN9l2bdCMsjkO9aNWqd vWsdHuK54zbeXEY5Odm.zIgZD8Ddm5osdhtYyNcCS2dZkhtubcs7Pspmt3sc pcG02Tsi26erqY2dw8O.nrAZ9. -----------end_max5_patcher-----------
have a look at combine or regexp
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…?
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
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*"?
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.
But would there be no solution with regexp ? Matching as many characters between frameXXXX***** until .jxf ?
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!
Forums > Jitter