Quantcast
Channel: Programming Forums
Viewing all articles
Browse latest Browse all 51036

how do you get the folder names from a directory

$
0
0
I am trying just to get the colder names from a directory after i search to see if a file exists or not.

my current code is as follows:

 Private Sub file_search_Click(sender As System.Object, e As System.EventArgs) Handles file_search.Click
        Dim search_file As String = "xxxxxxxxx/yyyyyyy/vvvvvvv/*/*/*.sig"

        If System.IO.File.Exists(search_file) = False Then


            For Each missing_file In search_file

                txt_PS_Progress.Text += vbCrLf + missing_file

            Next


        End If
    End Sub



in the search_file as string i had to block out the path with xxx yyy vvv .
the * are muliple folders in the above directories that must be searched for the missing .sig file

all i want to return is the folder name from the search that is missing the file with the .sig


thanks in advance

Viewing all articles
Browse latest Browse all 51036

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>