Description |
The GetTempPath returns the path of the directory that can be used to hold a temporary file on the current platform/machine.
You can use GetTempFileName to let the Operating System generate an empty unique temporary file that you can use as temporary storage.
|
|
Microsoft MSDN Links |
System.IO
System.IO.Path
|
|
|
A simple example |
program Project1;
{$APPTYPE CONSOLE}
uses
System.IO;
begin
Console.WriteLine('Temporary file path : ');
Console.WriteLine(System.IO.Path.GetTempPath);
Console.WriteLine;
Console.WriteLine('Temporary file name : ');
Console.WriteLine(System.IO.Path.GetTempFileName);
Console.Readline;
end.
| Show full unit code | Temporary file path :
C:\DOCUME~1\Neil\LOCALS~1\Temp\
Temporary file name :
C:\DOCUME~1\Neil\LOCALS~1\Temp\tmp1AE1.tmp
|
|
|
|