I've got a direcotry listing function that I'm using as part of a Telnet Server I'm making, but when I execute it many items get duplicated and some get reported as both files and folders... Any Ideas why?
------------------Code:Private Sub Dir_List() Dim sLine As String, iFiles As Integer, iFolders As Integer debug.print vbCrLf ' Folders sLine = Dir$("*.*", vbDirectory) Do Until sLine = "" debug.print sLine & vbTab & vbTab & vbTab & "<dir>" & vbCrLf sLine = Dir iFolders = iFolders + 1 Loop ' Files sLine = Dir$("*.*") Do Until sLine = "" debug.print sLine & vbCrLf sLine = Dir iFiles = iFiles + 1 Loop debug.print "-----------------" & vbCrLf debug.print iFiles & " file(s), " & iFiles & " folder(s)." & vbCrLf & vbCrLf End Sub
Matthew Ralston
E-Mail: [email protected]
ICQ:31422892
Web Sites:The Blue Link My Home Page




Reply With Quote