Visual Basic 2005 in a Nutshell (In a Nutshell (OReilly))

GetTempFileName Method

Location

My.Computer.FileSystem.GetTempFileName

Syntax

Dim result As String = My.Computer.FileSystem.GetTempFileName( )

Description

The GetTempFileName method creates a temporary file name in the user's temporary files folder and returns the full path to that new file as a string. The new file name will be unique and will initially be empty. The file name always ends with a ".tmp" extension.

Usage at a Glance

  • An exception occurs if the active user lacks sufficient privileges to create the file.

Related Framework Entries

  • Microsoft.VisualBasic.MyServices.FileSystemProxy.GetTempFileName Method

  • Microsoft.VisualBasic.FileIO.FileSystem.GetTempFileName Method

  • System.IO.Path.GetTempFileName Method

See Also

CurrentDirectory Property, Drives Property, FileSystem Object, FindInFiles Method, GetDirectories Method, GetDirectoryInfo Method, GetDriveInfo Method, GetFileInfo Method, GetFiles Method, Temp Property

Категории