Visual Basic Programming Code Examples Visual Basic > Files Directories Drives Code Examples 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