Home  |  Delphi .net Home  |  System.IO.Path  |  GetTempFileName Method
  
GetTempFileName  
Method  
Gets a temporary file in the temporary Directory (folder) on the current machine
Path Class
System.IO NameSpace
CF1.  Function GetTempFileName : String; Static;
CF : Methods with this mark are Compact Framework Compatible
Description
The GetTempFileName asks the Operating System to generate an empty unique temporary file that you can use as temporary storage. The returned string is the full path and file name of the temporary file.
Microsoft MSDN Links
System.IO
System.IO.Path
 Author links

 Buy Website Traffic at
 Buywebsitetrafficexperts.com

 Buy Proxies at
 Buyproxies.io
 
 
 
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.
   Temporary file path :
   C:\DOCUME~1\Neil\LOCALS~1\Temp
  
   Temporary file name :
   C:\DOCUME~1\Neil\LOCALS~1\Temp\tmp1AE1.tmp
 
 
Delphi Programming Neil Moffatt 2002 - 2017. All rights reserved.  |  Contact the author