◄Summary► ◄Details► ◄Example► ◄Contents► ◄Index► ◄Back► ────────────────────────────────────────────────────────────────────────────── NAME oldfilespec$ AS newfilespec$ Usage Notes ■ The NAME statement is similar to the MS-DOS RENAME command. ■ NAME can move a file from one directory to another but it cannot move a directory. ■ The file oldfilespec$ must exist and the file newfilespec$ must not be in use. Both files must be on the same drive. If you use NAME with different drive designations in the old and new file names, Visual Basic generates the error message, "Rename across disks." ■ If you use NAME on an open file, Visual Basic generates the run-time error message, "File already open." You must close an open file before renaming it.