A apandapion Dec 19, 2005 #1 What's the correct way to determine the path to the temp directory? I want to stick a log there.
I Ignacio Machin \( .NET/ C# MVP \) Dec 19, 2005 #2 Hi, What's the correct way to determine the path to the temp directory? I want to stick a log there. Click to expand... Path.GetTempFileName() will return a temp file name If you just need the path do a Path.GetDirectoryName( Path.GetTempFileName() ) cheers,
Hi, What's the correct way to determine the path to the temp directory? I want to stick a log there. Click to expand... Path.GetTempFileName() will return a temp file name If you just need the path do a Path.GetDirectoryName( Path.GetTempFileName() ) cheers,
B Ben Dewey Dec 19, 2005 #3 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)
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)