|
-
Jul 5th, 2008, 01:41 PM
#1
Thread Starter
Addicted Member
[RESOLVED] [2008] Find search file in directorim
I need simple code for searching files in text box to enter the name of file and in listbox to show results of searching.
-
Jul 5th, 2008, 03:37 PM
#2
Re: [2008] Find search file in directorim
-
Jul 6th, 2008, 07:10 AM
#3
Thread Starter
Addicted Member
Re: [2008] Find search file in directorim
Code:
Imports System
Imports System.IO
Public Class GetFilesTest
Public Shared Sub Main()
' Make a reference to a directory.
Dim di As New DirectoryInfo("c:\")
' Get a reference to each file in that directory.
Dim fiArr As FileInfo() = di.GetFiles()
' Display the names of the files.
Dim fri As FileInfo
For Each fri In fiArr
Console.WriteLine(fri.Name)
Next fri
End Sub 'Main
End Class 'GetFilesTest
But i dont want to take i file i want some file with some name morandi - angels and to show only that. ??
-
Jul 6th, 2008, 07:16 AM
#4
Re: [2008] Find search file in directorim
I don't understand you. What is "morandi - angels"?
-
Jul 6th, 2008, 08:04 AM
#5
Thread Starter
Addicted Member
Re: [2008] Find search file in directorim
The name of the song that i want to find in the directorium "morandi - angles.mp3" this is exsample
-
Jul 6th, 2008, 06:31 PM
#6
Re: [2008] Find search file in directorim
is this what you mean?
vb Code:
Dim files() As String = IO.Directory.GetFiles("c:\", "morandi - angels.mp3", IO.SearchOption.AllDirectories)
the 2nd parameter can contain wildcard characters (i.e. '*')
- Coding Examples:
- Features:
- Online Games:
- Compiled Games:
-
Jul 7th, 2008, 02:39 AM
#7
Thread Starter
Addicted Member
Re: [2008] Find search file in directorim
Somthing like that is possible without exstension please tell some using of this command.
Dim files() As String = IO.Directory.GetFiles("c:\", "morandi - angels.mp3", IO.SearchOption.AllDirectories)
-
Jul 7th, 2008, 06:02 AM
#8
Re: [2008] Find search file in directorim
Dim files() As String = IO.Directory.GetFiles("c:\", "morandi - angels.*", IO.SearchOption.AllDirectories)
- Coding Examples:
- Features:
- Online Games:
- Compiled Games:
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|