Results 1 to 2 of 2

Thread: Temp Folder

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Apr 2000
    Location
    Rafaela (Argentine)
    Posts
    107

    Question

    How can I get Temporal Folder's name?
    Thanks in advance.

  2. #2
    Guest
    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
    Use :

    Code:
      MyString = GetTmpPath
    Enjoy!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width