| **Navigation:**  [[introduction.htm|Language Reference]] > 13 - Built-in Functions >====== NAME (return file name) ====== | [[mousey return mouse vertical position .htm|{{btn_prev_n.gif|Previous page}}]][[introduction.htm|{{btn_home_n.gif|Return to chapter overview}}]][[next read next record in sequence .htm|{{btn_next_n.gif|Next page}}]] | | || **NAME(**//label//**)** {{blk2blue.jpg|blk2blue.jpg}} | **NAME** | Returns name of a file. | | //label// | The label of a FILE declaration. | The **NAME** procedure returns a string containing the operating system device name for the structure identified by the //label//. For FILE structures, if the file is OPEN, the complete DOS file specification (drive, path, name, and extension) is returned. If the FILE is closed, the contents of the NAME attribute on the FILE are returned. If there is no NAME attribute, the FILE label is returned. | **Return Data Type:** | STRING | **Example:** **OpenFile = NAME(Customer)  Save the name of the open file** **See Also:** [[exists return file existence .htm|EXISTS]]