Visual Basic Codes
ActiveX
Miscellaneous
Applications
Code Snippets
Common Dialogs
Special Effects
Database Stuff
Date Time
Files Drives
Forms
Graphics Games
Internet Stuff
Multimedia
Other
Strings
Windows
Visual Basic > Files Directories Drives sample source codes
Get the (sub)directorys
Get the (sub)directorys 'get (sub)directorys Public sub HaalDirOp(ByVal Path$) dim vDirName as String, LastDir as String Screen.MousePointer = vbHourglass If Right(Path$, 1) <> "\" Then Path$ = Path$ & "\" vDirName = Dir(Path, vbDirectory) ' Retrieve the first entry. do While Not vDirName = "" If vDirName <> "." And vDirName <> ".." Then If (GetAttr(Path & vDirName) And vbDirectory) = vbDirectory Then LastDir = vDirName MsgBox vDirName Call HaalDirOp(Path$ & vDirName) vDirName = Dir(Path$, vbDirectory) do Until vDirName = LastDir Or vDirName = "" vDirName = Dir Loop If vDirName = "" Then exit Do end If end If vDirName = Dir Loop Screen.MousePointer = vbNormal End Sub Return
Privacy Policy
|
Link to Us
|
Links