Alternative for GetTempPath

JackKaptijn

Registered User.
Local time
Today, 08:22
Joined
Dec 10, 2012
Messages
38
Hi there,

I used the 32-bit library to get a temporary filepath. But was looking for an alternative. I have created one myself:

Code:
Dim oFS As FileSystemObject
    Set oFS = New FileSystemObject
    Dim strPath As String
    
GetPath:
    strPath = oFS.GetSpecialFolder(TemporaryFolder) & "\Tmp" & Hex(Format(Time(), "HhNnSs") & Right(Format(Timer, "#0.00"), 2)) & "\"
    If oFS.FolderExists(strPath) Then GoTo GetPath
    
    GetTempFolder = strPath

I hope someone gets benefit out of this.

Jack
 

Users who are viewing this thread

Back
Top Bottom