How to stip .mov using sprintf

Ricardo's icon

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.

Max Patch
Copy patch and select New From Clipboard in Max.

what would the syntax in sprintf be?

$Adam's icon

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

Ricardo's icon

Thanks, I'll try this

(karrrlo)'s icon
Max Patch
Copy patch and select New From Clipboard in Max.

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

Ricardo's icon

I thank you so much. !!!!