TemporaryFolder Function

Used to access the Temporary folder.

Syntax

result = TemporaryFolder




Notes

TemporaryFolder returns a reference to a folder on the user's startup volume. Use it when you need to store a file in a place that the user can't see on the desktop. GetTemporaryFolderItem creates a FolderItem in this folder.

The TemporaryFolder function provides a way to access the Temporary folder that will work under different language systems.

The SpecialFolder module enables you to access many special folders that are managed by the OS.

Windows

On Windows, TemporaryFolder returns a reference to \user\Local Settings\Temp.

Macintosh

On Macintosh, TemporaryFolder returns a reference to :private:tmp:501:TemporaryItems.

Linux

On Linux, TemporaryFolder returns a reference to the /tmp directory.


Examples

This example displays the absolute path to the user's Temporary folder.

Dim f As FolderItem
f=TemporaryFolder
if f <> Nil Then
  MsgBox f.AbsolutePath
Else
  MsgBox "The folderItem does not exist."
End if

See Also

ApplicationSupportFolder, DesktopFolder, FontsFolder, GetTemporaryFolderItem, PreferencesFolder, StartupItemsFolder, SystemFolder, TrashFolder, SpecialFolder functions.