VBcoders Browse New Submit Contact Sign In

No account? Register free

Forgot password?

GetFolderPath

SteamboatWilly  (2 Submissions)   Files/File Controls/Input/Output   Visual Basic 5.0   Beginner   Wed 3rd February 2021

I've seen requests for this in the mail lists to here it is. This uses the windows scripting runtime to get the path to the requested directory. For example, as you know, the windows directory can be C:\Winnt\ , c:\windows\, etc. This code will retrieve the correct path to the directory.
'Currently written to get the Windows, System32, or Temp directory. Add others as you'd like.

Inputs
The type of folder to look for (Windows, Windows System, Temp)

Assumes
No Error Handling. Make sure that you enter your own error handling methods.

Returns
The path of the directory requested

Side Effects
Requires the Windows Scripting Runtime. Standard dll for the Windows OS with IE 6 installed.

API Declarations
'Also requires a reference to the windows Scripting Runtime.

Rate GetFolderPath (4(4 Vote))
GetFolderPath.bas

GetFolderPath Comments

No comments yet — be the first to post one!

Post a Comment

0/1000 characters