Code to check if the text file start with s exist in the given directory or not

Lakhangarg
Posted by Lakhangarg under VB.NET category on | Views : 2548
Code to find weather the text file start with s exists in the given directory or not.
Suppose we have a directory:
Dim RootPath AS String ="C://Lakhan//"
Dim files As String()
files = Directory.GetFiles(RootPath, "s*.txt")
If(files.Length>0) Then
'Files Exists
Else
'Files doesn't Exists
End If


Thanks
Lakhan Pal Garg

Comments or Responses

Login to post response