Contents Previous Next Subchapters

Renaming A File
Syntax mvfile(old name,  new name)
See Also exists , rmfile

Changes the name of the file specified by old name to new name, where old name and new name are character row vectors. If either of the files is currently open for reading or writing it is closed before the operation is performed. If the name change is successful, the logical scalar true is returned, otherwise the logical scalar false is returned.

If the file TEMP.OMS exists in the current working directory ( cwd ), and you enter
     mvfile("temp.oms", "junk.oms")
O-Matrix will respond
If you then enter
O-Matrix will respond

If there already is a file with the same name as specified by new name, the move will fail and mvfile will return false.