Forums > MaxMSP

How to stip .mov using sprintf

June 22, 2013 | 12:34 am

I want to remove the file name ending from a video file:

my_movie_file_name.mov

I assume i need to use sprintf to remove the .mov

see patcher.

what would the syntax in sprintf be?

<code>

– Pasted Max Patch, click to expand. –

</code>


June 22, 2013 | 2:29 am

Hi,

I guess you should try [regexp] for this. Even if you don’t know how to write regular expressions, a Google search will give you the right expression to strip the extension from a filename.

HTH,
Ádám


June 22, 2013 | 2:45 am

Thanks, I’ll try this


June 23, 2013 | 11:57 am

here are two ways to do this :
- one with [atoi] and one with [regexp]:

<code>

– Pasted Max Patch, click to expand. –

</code>


June 23, 2013 | 1:26 pm

I thank you so much. !!!!


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