VB icon

***Make ANY Folder The Root Of Windows Explorer***

Email
Submitted on: 1/3/2015 3:36:00 AM
By: Jim (from psc cd)  
Level: Not Given
User Rating: By 5 Users
Compatibility: VB 4.0 (16-bit), VB 4.0 (32-bit), VB 5.0, VB 6.0
Views: 2393
 
     My Code calls The Windows Explorer with the switch "e,/root," and makes any folder you want the root of the windows explorer
 
code:
Can't Copy and Paste this?
Click here for a copy-and-paste friendly version of this code!
				
'**************************************
' Name: ***Make ANY Folder The Root Of Windows Explorer***
' Description:My Code calls The Windows Explorer with the switch "e,/root," and makes any folder you want the root of the windows explorer
' By: Jim (from psc cd)
'
' Side Effects:It's a little slow calling the explorer cause i shell it, if you know better please edit at will
'**************************************

'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


Report Bad Submission
Use this form to tell us if this entry should be deleted (i.e contains no code, is a virus, etc.).
This submission should be removed because:

Your Vote

What do you think of this code (in the Not Given category)?
(The code with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor (See voting log ...)
 

Other User Comments


 There are no comments on this submission.
 

Add Your Feedback
Your feedback will be posted below and an email sent to the author. Please remember that the author was kind enough to share this with you, so any criticisms must be stated politely, or they will be deleted. (For feedback not related to this particular code, please click here instead.)
 

To post feedback, first please login.