◄QuickSCREEN► ◄Details► ◄Example► ◄Contents► ◄Index► ────────────────────────────────────────────────────────────────────────────── NAME Statement Details Syntax NAME oldfilename AS newfilename The NAME statement is similar to the DOS RENAME command. NAME can move a file from one directory to another but cannot move a directory. The arguments oldfilename and newfilename are string expressions each of which contains a file or directory name and an optional path. If the path in newfilename is different from the path in oldfilename, the NAME statement changes the pathname as well as renames the file as indicated. A file named oldfilename must exist and the newfilename must not be in use. Both files must be on the same drive. Using NAME with different drive designations in the old and new file names produces an error message that reads "Rename across disks." After a NAME statement, the file exists on the same disk, in the same disk space, but with the new name. Using NAME on an open file causes a run-time error message that reads "File already open." You must close an open file before renaming it.