Rename a file or directory

Added by iNTERFACEWARE

Use os.fs.rename() to rename a file or directory, if the file or directory does not exist an error is returned

Source Code
   -- create and create and rename a directory
   os.fs.mkdir('MyTempDir')
   os.fs.stat('MyTempDir')
   
   -- rename the directory
   os.rename('MyTempDir','YourTempDir')
   
   os.fs.stat('MyTempDir') -- stats no longer available
   os.remove('YourTempDir')
Description
Use os.fs.rename() to rename a file or directory, if the file or directory does not exist an error is returned