How to populate a coll with a list of files?


    Apr 01 2006 | 1:34 pm
    I need to populate a coll with a filenames of files contained in a
    folder.
    For now, I use ubumenu (with dropfile) to get the list of files and
    then I parse them one by one to get them into coll. I know there are
    very handy third party objects that do this kind of stuff, but for
    this I want to use only standard distribution objects.
    What I did works, but from time to time there is some parsing error
    (like non exiting files appearing in a list), that i didn't manage to
    nail yet. I will make it work, but i was wondering if there was some
    other automatic and more reliable method to acomplish this.
    I would be very happy if I could somehow read the content of ubumenu,
    but that doesn't seem to be possible.
    I suppose this kind of thing could be easily done with Java, but I
    don't know anything about that stuff.
    Klif

    • Apr 01 2006 | 5:06 pm
      can you post the patch, so the hive mind can take a look and see
      where the error might be?
      v a d e //
      www.vade.info
      abstrakt.vade.info
    • Apr 02 2006 | 12:22 pm
      thanx vade.
      My prime concern was if there is some easier way to acomplish this.
      Thinking about the problem I realised I was parsing using metro to
      drive it. I think i should change this and bang the next read (from
      ubumenu) when previous file has finished parsing.
      Also, there might be some problems with patch initialisation.
      I'll clean the patch and post the results/problems.
      Again, thanx for your concern.
      Klif
    • Apr 02 2006 | 8:19 pm
      Hello klif,
      this is how I once did it, using the folder object.
      this was a while back, and only used on a mac.
      so lots of disclaimers here.
      I am not sure if this addresses your "parsing errors" problem.
      HtH anyway.
      -jennek
      max v2;
    • Apr 03 2006 | 4:38 pm
      Thanks Jennek, and vade!
      I completely forgot about folder object. I was using it before, but
      since ubumenu appeared, it seems that folder object disappeared from
      my fragile memory ;)
      As for parsing errors that i was mentioning before, I figured what
      was wrong (I still don't know why tough).
      I was using a feedback loop to feed the counter at the "top" of the
      patch. Counter would trigger ubumenu/coll filled with filenames. Then
      I would do some processing on the filename (extracting date and time
      values from filenames *** see below), saving results in second coll.
      Obviously, counter was banged by last operation in the chain (in this
      case, it was parsed data going to second coll). For some reason, the
      loop would stop ocasionally, and I needed to add considerable delay
      (and different amounts => delay 3 on dual 2Gig G5, delay 10 on dual
      1Gig G4, delay 15 on Titanium 400mhz) to get all the values.
      After some messing with the patch, I ended up using deferlow followed
      by delay in feedback loop. Now the patch works sucessfully on all
      machines I tried it on.
      I seem to remember that I used to have similar problems before, when
      I would be using long lists stored in colls.
      It would probably be easier if I posted the simplified patch in the
      first place, but I don't have license for max on my old laptop that I
      use to check mail, so I can't easily prepare and send patches.
      Klif
      *** This is the part of the project I don't know much about. Some
      kind of video server, records video into mpeg files, and names them
      by date and time (like VIDEO_20061015_234512.mpg YYYYMMDD_HHMMSS
      format). My friend wants to read specific files/time and do some
      processing on it.
      I need data in format YMMDDHHMMSS - in that case, I can directly
      compare values using ">" and " specific "moment in time".