How to find subfolders within a folder

Posts 18 of 8 · Page 1 of 1
How to find subfolders within a folder
Alright guys so im making an anti cheat program which scans files md5 signature and if contains a hacks md5 signature then it reports it to the leader but anyway i just want to know how find the names of a sub folder within a folder. Ex: i have a folder at C:\hi and that folder has a sub folder within it named "bye" how would i find this via VB?
Thanks, Bombs.
Here we go. Correct any errors as necessary. Just wrote it on MPGH post reply, so yeahs. C# and Visual Basic versions provided.

You will need to put your MD5 hashes which you want to check against in an array, either hard coded or loaded from a file or from a website or however you want into a string[] called "MD5Hashes". You can change the variable names if you wish.


Code:
Private Sub DirSearch(sDir As String)
	For Each d As String In Directory.GetDirectories(sDir)
		Console.WriteLine(d)
		DirSearch(d)
	Next
End Sub

Private Function main() As Integer
	DirSearch("C:\freedompeace")
End Function
Please remember to give credits
on top of that, C# stays in C#
Posts 18 of 8 · Page 1 of 1
This thread is closed for replies.

Tags for this Thread

None

Need help?