How can I get Temporal Folder's name?
Thanks in advance.
Printable View
How can I get Temporal Folder's name?
Thanks in advance.
Use :Code:Declare Function GetTempPath Lib "kernel32" Alias "GetTempPathA" (ByVal nBufferLength As Long, ByVal lpBuffer As String) As Long
Public Function GetTmpPath()
Dim strFolder As String
Dim lngResult As Long
Const MAX_PATH = 260
strFolder = String(MAX_PATH, 0)
lngResult = GetTempPath(MAX_PATH, strFolder)
If lngResult <> 0 Then
GetTmpPath = Left(strFolder, InStr(strFolder, Chr(0)) - 1)
Else
GetTmpPath = ""
End If
End Function
Enjoy!Code:MyString = GetTmpPath