diff options
Diffstat (limited to 'Tools/fileman/delmix.py')
-rwxr-xr-x | Tools/fileman/delmix.py | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/Tools/fileman/delmix.py b/Tools/fileman/delmix.py new file mode 100755 index 000000000..b6b8cdd4b --- /dev/null +++ b/Tools/fileman/delmix.py @@ -0,0 +1,24 @@ +#!/usr/bin/env python +# +# /fs/microsd/etc/mixers/FMU_quad_x.mix file deleter +# + +from nsh import NSH + +def main(): + fn = "/fs/microsd/etc/mixers/FMU_quad_x.mix" + + try: + nsh = NSH() + nsh.wait_and_open_nsh() + if nsh.file_exists(fn): + nsh.exec_cmd("rm {}".format(fn), 2.0) + print("Success.") + else: + print("Cannot find {}".format(fn)) + + finally: + nsh.close() + +if __name__ == "__main__": + main() |