p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   .NET Framework 1.x (http://p2p.wrox.com/forumdisplay.php?f=203)
-   -   dynamically check version of exe file in FTP - VB.Net (http://p2p.wrox.com/showthread.php?t=82615)

remya1000 February 15th, 2011 01:08 PM

dynamically check version of exe file in FTP - VB.Net
to find version of an exe, i use this code

Dim FileProperties As FileVersionInfo = FileVersionInfo.GetVersionInfo(Application.ExecutablePath)
Textbox1.Text = FileProperties.FileVersion

How come we find a version of an exe that's uploaded in FTP? i need the version of an exe that's already there in FTP. i know the path where the exe file is saved in FTP.

if you have any idea, please help me...

Thanks in advance...

remya1000 February 25th, 2011 05:29 PM

the exe name is getting too big. so instead of adding the version number in exe name, i will create a text file in that folder that contains verison number. so i can check this .txt file name to get version number.

for example: the text file name is going to be Ver. is version number, that keeps on change.

is there a way i can check the file that starts with "Ver" and ends with ".txt". so i can find the version number.

how come i check the file name from FTP?

if you have any idea, please let me know.

Thanks in advance...

remya1000 March 1st, 2011 12:34 PM

in the attached file, function GetFileList there is a line


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.


  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
        Return VerFileName
    End Function

All times are GMT -4. The time now is 03:57 PM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.