Forums > MaxMSP

Write files to a specific folder

May 22 2009 | 8:17 pm

I have a patch that needs to generate two files simultaneously. The two files are the same except that one is an uncompressed movie file, the other a compressed file. Until now, my files(I only experimented writing one at a time) end up in the same folder as where the patch is. How can I specify to which folder the files should go?

May 23 2009 | 12:41 am

I assume you pass the filename by a write message? Then you can use a sprintf object to prepend a path to your filename argument.

Preferably you should normalize your path with absolutepath or similiar.

Edit: typo

May 23 2009 | 12:52 am

With sprintf you can specify a path to write to like this:

— Pasted Max Patch, click to expand. —
May 23 2009 | 8:32 pm

Ok, now I have a problem. I already use sprintf for the name of my movie file. the name of the movie file is generated with ticks message, so I get something like "write 30. h263 max"Now I need to add the searchpath. How do I do that?
I added the patch. Anyone can help me out?

May 24 2009 | 8:42 am

Sprintf provides an inlet for each % argument specified:

— Pasted Max Patch, click to expand. —
Viewing 5 posts - 1 through 5 (of 5 total)

Forums > MaxMSP