How to Erase a file/delete trash in finder from Max?

Mari Kimura's icon

Hi,
I need to use a device for someone that doesn't accept buffer~ and she has to use sfplay~/sfrecord~ in real-time. I got it to work using sprintf but I still need to ERASE the auto-created .aif file in the finder path then DELETE from trash, directly from Max without going into finder during the performance.

I could do this which would become mari%ld.aif -> into mari1.aif,mari2.aif, mari3.aif,... Then every time we start the piece she has to go to finder and manually trash it and it will work. It involves restarting Max though.

But MaxMSP being so elegant :) I thought there has to be a way....

If anyone knows how to do this please let me know...
Thanks!
mari

o s's icon

than rm ~/Folder filename

be very careful with the remove command! You can't redo it!

hth

ole

Mari Kimura's icon

OK thanks so much! This scares me but I knew it has to be possible! :)

o s's icon

I would strongly recommand to make a little google research on "shell" "terminal" "unix-commands" first :-)

Mari Kimura's icon

YES! :)
I know very little about shell, man, ls, and I do know rm but didn't know you can access from Max :)
As I said this is scary... but it is great to know it's possible--thanks!

pdelges's icon

Maybe Java is less scary than shell... and it is portable!
-> https://cycling74.com/tools/mxj-filesys-v0-2-3/

p

Mari Kimura's icon

Oh great thank you! I have bunch of things to learn now :)