VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Make ANY Folder The Root Of Windows Explorer

by Jim (1 Submission)
Category: Windows API Call/Explanation
Compatability: Visual Basic 3.0
Difficulty: Unknown Difficulty
Date Added: Wed 3rd February 2021
Rating: (5 Votes)

My Code calls The Windows Explorer with the switch "e,/root," and makes any folder you want the root of the windows explorer

Side Effects
It's a little slow calling the explorer cause i shell it, if you know better please edit at will

Rate Make ANY Folder The Root Of Windows Explorer

'it's a module
'i went a little DIM crazy with the 
'variables but it's still good code...enjoy
Public Sub eRoot(rootpath As String, fldrs As Boolean)
'fldrs is the folders switch, monkey with it and see what you get
On Error Resume Next
Dim EX, ARGU, path, X
If fldrs = True Then
EX = "explorer.exe"
ARGU = " /e,/root, "
path = rootpath$
X = Shell(EX & ARGU & path, 1)
ElseIf fldrs = False Then
EX = "explorer.exe"
ARGU = " n/e,/,root, "
path = rootpath$
X = Shell(EX & ARGU & path, 1)
End If
End Sub

Download this snippet    Add to My Saved Code

Make ANY Folder The Root Of Windows Explorer Comments

No comments have been posted about Make ANY Folder The Root Of Windows Explorer. Why not be the first to post a comment about Make ANY Folder The Root Of Windows Explorer.

Post your comment

Subject:
Message:
0/1000 characters