tempName

Typefunction
DictionaryLCS
LibraryLiveCode Script
Syntax
the tempName
tempName()
Summary

Returns a unique file name in the folder the operating system uses for temporary files.

Introduced1.0
OSmac, windows, linux, ios, android
Platformsdesktop, server, mobile
Example
the tempName
put the tempName into testDataPath
Values
NameTypeDescription
return

The tempName function returns an absolute file path.

RelatedKeyword: file
Property: filename
Command: rename, open file, create folder
Function: specialFolderPath, files
Control Structure: function
Glossary: absolute file path, command, return, folder
Securitydisk
Description

Use the tempName function to find an appropriate place to put a temporary file.

You can use temporary files to store intermediate data, downloaded URLs, and other material that is more conveniently placed in a file but does not need to be saved permanently.

Using the tempName function does not create the file, only gets a suggested file name. Use the open file command to create the file.

The file name returned by the tempName function is one that doesn't exist, so you can use it safely. If you need to create another file, use the tempName function again to obtain a new file name.

The location of the temporary files depends on the operating system. Each operating system provides its own location for temporary files.

Tagsfile system