Delete a file with Node for Max

    Jan 03 2022 | 2:08 am
    Hello! I'm solid with max but I'm pretty clueless about node. From my research it seems like we can delete files with node. Does anyone have an example or suggestion on where to look? Thank you Ben

    • Jan 03 2022 | 2:24 am
      I'm doing more research and I found the filesystem page of the Node for Max overview. However, when I send a 'rm' command to node, I get an error saying
      'node.script: Node script not ready can't handle message rm'
      Any tips?
    • Jan 03 2022 | 1:05 pm
      If you can't manage to run node script ??? , try to use shell object. it needs absolute path to file to delete, slash based. If this is to delete sfrecord files, you could use savedialog to make file in first place, and use same path to delete it later.
      Option 2 is to record into buffer, if recording is not that long, then crop and write buffer if you want to keep recording.
    • Jan 18 2022 | 5:45 pm
      I'm still trying to hunt this down!
      Here's something I adapted from the Node4Max overview.
      As far as I can tell, I should be able to drop a file in the patcher, and have Node delete it, but I get an error.
      Can anyone see where I'm messing up?
      Thank you! Ben
    • Jan 19 2022 | 11:48 am
      check path. all this shell based objects need slash based path
      This won't work: "Mac Hd:/Users/user/Desktop/File to delete.rtf" this does: "/Users/user/Desktop/File to delete.rtf" Read conformpath help, and set it according to OS used. on Mac :
      By the way - using node forces one to use CEF framework, which then makes Standalone apps much bigger size. Using shell object instead is much easier.