View Single Post
Old Jul 21st, 2006, 4:21 PM   #2
randum77
Programmer
 
randum77's Avatar
 
Join Date: Jun 2006
Location: Fayettehell, NC
Posts: 56
Rep Power: 3 randum77 is on a distinguished road
Ok, I got it so that the array's worked and did a file list to a text box for the files in a dir and so on. Here's the code if your interested. I put it in the click event of the uiGoButton.

 Dim path As String
        Dim dir, file As Object
        Dim dirName, fileName As String


        Me.uiOutputTextBox.Text = ""

        'Gets the directory to search and assigns to variable
        path = Me.uiLocationTextBox.Text



        file = System.IO.Directory.GetFiles(path)
        For Each fileName In file
            Me.uiOutputTextBox.Text = (Me.uiOutputTextBox.Text & fileName & ControlChars.NewLine)
        Next

        dir = System.IO.Directory.GetDirectories(path)
        For Each dirName In dir
            Me.uiOutputTextBox.Text = (Me.uiOutputTextBox.Text & dirName & ControlChars.NewLine)
            file = System.IO.Directory.GetFiles(dirName)
            For Each fileName In file
                Me.uiOutputTextBox.Text = (Me.uiOutputTextBox.Text & "     " & fileName & ControlChars.NewLine)
            Next
        Next
    End Sub

Let me know what you think.
__________________
_Marshall_

"America has bred a society that is innocent and incapable of accepting responsibility, but yet, is able to place blame on others without guilt."
randum77 is offline   Reply With Quote