bas7advr.hlp (
Topic list)
NAME Statement Details
◄Syntax► ◄Details► ◄Example► ◄Contents► ◄Index► ◄Back►
──────────────────────────────────────────────────────────────────────────────
NAME changes the name of a disk file or directory.
NAME oldfilespec$ AS newfilespec$
Usage Notes
■ 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 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 filespecs, BASIC
generates the error message, "Rename across disks."
■ If you use NAME on an open file, BASIC generates the run-time error
message, "File already open." You must close an open file before
renaming it.