temp directory

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

hey all,

is there a way in vb.net code to access whatever temp folder location any pc
is pointing to?

thanks,
rodchar
 
Hi,

If by the temp folder you are referring to the folder which opens when
I type %temp% in the Run field and is located at :

C:\Documents and Settings\<UserName>\Local Settings\Temp

Then you can use the GetEnvironmentVariable method of the Environment
class as :
--------------------------
Dim path As String = Environment.GetEnvironmentVariable("Temp")
Process.Start(path)
--------------------------

If you mean the Temporary Internet Files folder, then you can simply
use the GetFolderPath method of the Environment class with the Enum
value "InternetCache".

HTH,

Regards,

Cerebrus.
 
Back
Top