NAME StringExpr1 AS StringExpr2
Description:
This command renames the file specified in the string expression StringExpr1 to StringExpr2. StringExpr1 can represent any valid filename that is not a read-only file, and StringExpr2 can be any valid filename as long as it doesn't specify a file that already exists.
Usage:
'rename the old file as a backup
name rootFileName$ + ".fre" as rootFileName$ + ".bak"
'open a new file and write data
open rootFileName$ + ".fre" for output as #disk