Get Windows Temporary Folder

If you need to get windows temporary folder for your application you need to follow this steps.

function GetTempDirectory: String;
var
TempDir: array[0..255] of Char;
begin
GetTempPath(255, @TempDir);
Result := StrPas(TempDir);
end;

procedure TForm1.BitBtn1Click(Sender: TObject);
begin
label1.Caption := gettempdirectory;
end;
Download Source Code

Incoming search terms:

  • delphi get downloads folder
  • delphi Get Temp Dir
  • delphi gettempdir
  • delphi xe tempdir
  • get folder temp delphi
  • getenvironmentvariable delphi get temp dir jcl
  • gettempdir delphi
This entry was posted in Files, System. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Please copy the string h4Zur5 to the field below: