Write files to a specific folder

May 22, 2009 at 8:17pm

Write files to a specific folder

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?

#44048
May 23, 2009 at 12:41am

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

#158188
May 23, 2009 at 12:52am

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

– Pasted Max Patch, click to expand. –
#158189
May 23, 2009 at 8:32pm

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 60543221.mov 30. h263 max”Now I need to add the searchpath. How do I do that?
I added the patch. Anyone can help me out?

#158190
May 24, 2009 at 8:42am

Sprintf provides an inlet for each % argument specified:

– Pasted Max Patch, click to expand. –
#158191

You must be logged in to reply to this topic.