Contents Previous Next Subchapters

Creating A Temporary File Name
Syntax tempfile
See Also rmfile , exists

Description
Returns a character row vector containing a name that can be used for a temporary file. If the system environment variable TMP is defined, tempfile returns a file name within the directory that TMP specifies. Otherwise, if the environment variable TEMP is defined, tempfile returns a file name within the directory that TEMP specifies. If neither TMP nor TEMP is defined, tempfile returns a local file name.

If you do not explicitly delete the file (for example using rmfile ), it is automatically deleted when it you exit the O-Matrix session.

Example
If the environment variable TMP is defined in your system to be C:\TEMP, and you enter
     tempfile
O-Matrix will respond
     C:\TEMP\TMP3.OMS
The exact number in the file name (3 above) may vary depending what temporary files are already in the C:\TEMP directory. (You can determine what environment variables are defined in your system by selecting the system Control Panel | System | Environment dialog.)