Forums > MaxMSP

catch entire filepath when storing an xml file

December 20, 2009 | 5:35 pm

Hi list,

When I write the content of a pattrstorage object I can choose the folder (and even create a new one) where I store the xml file it creates.
but the pattrstorage only sends "write filename.xml 1" when it’s done.
What i need is the complete filepath so i can use it to automaticaly store other sub-pattrstorages contained in sub-patches in the same folder.
any idea ?
thank’s a lot


December 20, 2009 | 7:06 pm

You can use [savedialog fold] to specify a location and then use [sprintf] to format it to write your xml, this means you can reuse the location again whenever you like.

lh


December 20, 2009 | 10:30 pm

thank’s a lot.
(how did I miss that ??)
do you know how I could throw the filename to get only his folder path ?
regexp maybe but I don’t speak his language…


December 20, 2009 | 10:37 pm

Got it ! just in one test !

regexp (.+/).+

kind of magic for me but it works


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