| **Navigation:**  [[advanced topics 1.htm|Advanced Topics]] > Clarion Language Utilities >====== GetTempFileName (Generate a temporary file) ====== | [[getreg get windows registry entry .htm|{{btn_prev_n.gif|Previous page}}]][[advanced topics 1.htm|{{btn_home_n.gif|Return to chapter overview}}]][[gettemppath return tmp or temp environment path .htm|{{btn_next_n.gif|Next page}}]] | | || **GETTEMPFILENAME( **//prefix, <;pathname> //**//)//** {{blk2blue.jpg|blk2blue.jpg}} | **GETTEMPFILENAME** | Returns the name of a temporary file | | //prefix// | A string constant or variable naming the prefix (first three letters) of the temporary file. If blank, the default prefix used is '$$$' | | //pathname// | A string constant or variable naming the location of the temporary file. If omitted, the system TEMP or TMP directory path is used. | **GETTEMPFILENAME** is used to generate a temporary file. If the //pathname //specified is invalid, **GETTEMPFILENAME** returns an empty string. {{notebox.jpg|NoteBox.jpg}} Make sure to remove your temporary files that you create after use. The Windows system will not automatically remove these files. To add support for this utility to your existing applications, you need only include the CWUTIL.INC file in the Global Map section of your program: **INCLUDE('CWUTIL.INC'),ONCE** **Return Data Type:     **STRING **Example:** **!Note ****//##//**** represents a random number assigned to the temporary file name** **    message(GETTEMPFILENAME('bob','d:\help'))   !created 'bob****//##//****.tmp' in D:\help** **    message(GETTEMPFILENAME(''))                !created '$$$****//##//****.tmp' in** **                                                !C:\WINNT\TEMP (my TEMP path)**