Home > DeveloperSection > Forums > how to programatically check temporary files in system using c#
Anupam Mishra

Total Post:135

Posted on    January-21-2016 6:48 AM

 C# C#  .NET 

 1 Reply(s)
 206  View(s)
Rate this:
Hi Everyone,
I want to access  all temporary files in my system with its size. Please give me a solution.

Thank You.

Shiva Shukla
Shiva Shukla

Total Post:13

Posted on    January-24-2016 11:21 PM

To read from the temp file
private static void ReadTmpFile(string tmpFile)
        // Read from the temp file.
        StreamReader myReader = File.OpenText(tmpFile);
        Console.WriteLine("TEMP file contents: " + myReader.ReadToEnd());
    catch (Exception ex)
        Console.WriteLine("Error reading TEMP file: " + ex.Message);

Don't want to miss updates? Please click the below button!

Follow MindStick