Create a folder

Mar 20, 2008 at 9:19am

Create a folder

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

thanx 4 help

#36435
Mar 20, 2008 at 10:08am

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

#125043
Mar 20, 2008 at 10:18am

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

#125044
Mar 20, 2008 at 10:35am

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

#125045
Aug 19, 2008 at 9:44am

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

Bas

#125046
Aug 19, 2008 at 10:06am

#125047
Aug 19, 2008 at 12:46pm

Hello Julien,

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

Bas

#125048

You must be logged in to reply to this topic.