checking and deleting files in JS or MXJ

    May 03 2006 | 1:47 pm
    Hi everybody,
    I have a patch that uses a folder with 20 aiff files. Users record in this folder, and overwrite older stuff if there are more than 20 files. So recording 21: delete old file 1 and save 21 as the new 1 etc.
    What I need are functions that check the folder for files, add files, delete files etc.
    Also, I need to upload selected files to a server via ftp.
    I use a combination of Max, shell commands and Ruby to make all this work. Unfortunately, this is real messy, mostly because of the difference between Max paths and UNIX paths.
    I would love some hints how to solve this more elegantly in Java or JS.
    All suggestions welcome! Please keep in mind that I am a experienced programmer, but a Java/MXJ newbie.