Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27513

VS 2010 [RESOLVED] Searching file in my computer

$
0
0
Code:

Dim foundSong As String
        For Each foundSong In My.Computer.FileSystem.GetFiles("Directory", FileIO.SearchOption.SearchAllSubDirectories, "*.mp3*")
            ListBox1.Items.Add(foundSong)
        Next

im searching mp3 files in my computer with these codes. Question is if the directory would be "C:\". im getting error like program doesnt search "C:\blabla" because its system folder. i dont want to search that system folder , how can i pass that folder to the next folder. i tried try catch but i couldt find any code for the catch part.

in shortly , on error while searching i want to go next folder.
(sorry about my english)

Viewing all articles
Browse latest Browse all 27513

Trending Articles



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