qb45advr.hlp (
Topic list)
NAME Statement Programming Example
◄QuickSCREEN► ◄Details► ◄Example► ◄Contents► ◄Index►
──────────────────────────────────────────────────────────────────────────────
NAME Statement Programming Example
This example shows how to use NAME to rename your README.DOC file.
CLS ' Clear screen
'Change README.DOC to READMINE.DOC
NAME "README.DOC" AS "READMINE.DOC"
FILES ' Display the files in your directory to confirm name change
PRINT
PRINT "README.DOC is now called READMINE.DOC"
PRINT "Press any key to continue"
DO
LOOP WHILE INKEY$ = ""
'Change name back to README.DOC and confirm by displaying files
NAME "READMINE.DOC" AS "README.DOC"
FILES
PRINT
PRINT "README.DOC is back to its original name"
Tip: You can also use NAME to move a file from one directory to
another. You can move README.DOC to the directory MYDIR
with the following statement:
NAME "README.DOC" AS "MYDIRREADME.DOC"