How to list the subfolders of a folder


    Oct 23 2011 | 8:27 am
    Hi,
    Is it possible to list the subfolders of a folder in Max or javascript for Max? I know about the [folder] object but I can't see how it can be used to list the subfolders of a folder (no appropriate 'types' message). I'm working with Max 5 on OS X SL.
    Cheers,
    Aengus.

    • Oct 23 2011 | 8:41 am
      hi,
      have a look to : /Applications/max5/examples/javacript/file/jsfolderiter.js
    • Oct 23 2011 | 8:43 am
      Oops. Sorry- it's right there in the js docs:
      inlets = 1; outlets =1;
      function listfolder(x) { f = new Folder(x); while(!f.end) { post(f.filename); if (f.filetype == "fold") { outlet(0,f.filename); } f.next(); } }
      Cheers,
      Aengus.