dumping a log to temp

  • Thread starter Thread starter apandapion
  • Start date Start date
A

apandapion

What's the correct way to determine the path to the temp directory? I
want to stick a log there.
 
Hi,

What's the correct way to determine the path to the temp directory? I
want to stick a log there.

Path.GetTempFileName() will return a temp file name

If you just need the path do a Path.GetDirectoryName(
Path.GetTempFileName() )



cheers,
 
use the System.IO.Path.GetTempPath(), should return C:\doc and
settings\username\Local Settings\Temp

System.IO.Path.GetTempFileName get a random 8 chars + .tmp (ie.
cetqkcdd.tmp)
 
Back
Top