CLI for moving/renaming stored gcode files & metadata

I know I can use the Octoprint filemanager and other similar plugins to move/rename/delete stored gcode files using the Octoprint WebUI.
However, I find that solution slow/laggy and relatively inflexible as I am a CLI-type guy...

In the past, I have manually moved/renamed gcode files stored in the ~/octoprint/uploads file heirarchy by first moving the file and then carefully editing the corresponding .metadata.json files -- deleting the entry from the original location and adding it to the new location.
However, this approach is painful and error-prone.

So, I was wondering if anybody has written a CLI script to move/rename gcode files and update the requisite .metadata.json files.
Also, would be cool to set up a FUSE filesystem that would allow listing/copying/moving/deleting gcode files within the ~/octoprint/uploads heirarchy. Has anyone explored this?

If there is not an existing CLI script, can someone point me to any existing low-level subroutines that I could tap into and call from my CLI script -- as this should be easier, cleaner, and safer than hacking up some python/perl script to parse and edit the .metadata.json files manually.

Any and all pointers welcome!

Thanks!

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.