Surendra Sharma

Surendra Sharma

Search This Blog

Friday, June 4, 2010

How to get Temporary Folder Path using .NET (C#)

How to get path of the current system's temporary folder using .NET (C#)
Temporary folders are useful to store simple logs during execution of the program. It is also used for storing the decompressed files before any operation. The folder location varies from OS to OS. The following C# snippet would help in retrieving the Temporary folder path

string sPath;

sPath =
Path.GetTempPath();

Console.WriteLine("Temporary Path := " + sPath );

No comments:

Post a Comment