qb45advr.hlp (Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
NAME Statement Details
  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.