Forums > MaxMSP

Create a folder


ATH
March 20, 2008 | 9:19 am

HI,
is it possible and how can i create a folder on the HD directly out of a MaxMSP Patch?

thanx 4 help


March 20, 2008 | 10:08 am

On 20 mars 08, at 10:19, ATH wrote:
>
> HI,
> is it possible and how can i create a folder on the HD directly out
> of a MaxMSP Patch?

If it has to be done on both platforms, you could use [mxj], i.e. Java.
On OSX, there is jasch’s [createfolder], you could also use [shell]
On win, I think f.e. did some kind of [doshack].

_____________________________
Patrick Delges

Centre de Recherches et de Formation Musicales de Wallonie asbl

http://www.crfmw.be/max


March 20, 2008 | 10:18 am

On 20.03.2008, at 10:19, ATH wrote:

> is it possible and how can i create a folder on the HD directly out
> of a MaxMSP Patch?

If you’re using a mac, you have a few options. You can use an
external by jasch called [createfolder] or you use the external
[shell] and create the folder by using commandlines.
[mkdir /path_to_the_new_folder/]

cheers
Piet


March 20, 2008 | 10:35 am

On 20 Mar 2008, at 10:08, Patrick Delges wrote:

> If it has to be done on both platforms, you could use [mxj], i.e.
> Java.

Thank you for volunteering to use Python for MaxMSP:

http://www.loadbang.net/space/Software/net.loadbang.jython

If you don’t mind the effort of installing that (and the instructions
should all be clear), the rest is easy. Here’s the Python file:

—snip—
from java.io import File

def mkdir(fullPath):
if File(fullPath).mkdir():
maxObject.post(‘created ‘ + fullPath)
else:
maxObject.error(‘could not create ‘ + fullPath)
———-

Here’s a demo patcher:

—snip—
max v2;
#N vpatcher 283 336 769 536;
#P window setfont Monaco 9.;
#P window linecount 1;
#P message 52 62 208 262153 mkdir /Users/nick/Desktop/testdir;
#P newex 52 86 334 262153 mxj net.loadbang.jython.mxj.ScriptEngine
@script mkdir;
#P connect 1 0 0 0;
#P pop;
———-

Nick Rothwell / Cassiel.com Limited
http://www.cassiel.com
http://www.myspace.com/cassieldotcom
http://www.last.fm/music/cassiel
http://www.reverbnation.com/cassiel
http://www.linkedin.com/in/cassiel
http://www.loadbang.net


August 19, 2008 | 9:44 am

I would like to create folder on windows, so assume I should go for the shell external.
But…where can I find this?

Bas



jln
August 19, 2008 | 10:06 am


August 19, 2008 | 12:46 pm

Hello Julien,

Thanks for the tip, it’s great :).
I’ll reply in that post…

Bas


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