View Single Post
  #3 (permalink)  
Old March 1st, 2011, 12:34 PM
remya1000 remya1000 is offline
Authorized User
Points: 386, Level: 6
Points: 386, Level: 6 Points: 386, Level: 6 Points: 386, Level: 6
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Sep 2007
Location: windsor, toronto, Canada.
Posts: 62
Thanks: 0
Thanked 0 Times in 0 Posts
Default

in the attached file, function GetFileList there is a line

Code:
mess = m_sMes.Split(seperator)
mess is an array of string:

So if the fucntion GetFileList you are reading the file names into the array 'mess'. So you need a new function to get the version, you already have the filenames in a string array. Pass 'mess' array into a function to loop through the array and do some string compair to find the file you need.

Code:
   Public Function GetVerFile(ByVal mess() As String)
        Dim VerFileName As String
        For Each strfile In mess
            If strfile.SubString(0, 3) = "Ver" And strfile.Substring(strfile.length - 3, 3) = "txt" Then
                ''do some code here.  If code is here then strfile must start with 'Ver' and end with 'txt'. This is persuming that the names returned in the array have the extension on the end.
            End If
        Next
        Return VerFileName
    End Function
Reply With Quote