NET FTP Library
DateParseFormats Property
Example 






KellermanSoftware.NetFtpLibrary Namespace > FTP Class : DateParseFormats Property

Contains regular expression formats to parse the date and time portion of FTP directory listings. You may add your own date/time parsing format for your FTP server. Please put the parsing expressions into .NET regular expression groups. See the examples below.

Regular Expression Groups

Syntax
'Declaration
 
Public Property DateParseFormats As System.Collections.Generic.List(Of String)
'Usage
 
Dim instance As FTP
Dim value As System.Collections.Generic.List(Of String)
 
instance.DateParseFormats = value
 
value = instance.DateParseFormats
public System.Collections.Generic.List<string> DateParseFormats {get; set;}
public read-write property DateParseFormats: System.Collections.Generic.List; 
public function get,set DateParseFormats : System.Collections.Generic.List
public: __property System.Collections.Generic.List<string*>* get_DateParseFormats();
public: __property void set_DateParseFormats( 
   System.Collections.Generic.List<string*>* value
);
public:
property System.Collections.Generic.List<String^>^ DateParseFormats {
   System.Collections.Generic.List<String^>^ get();
   void set (    System.Collections.Generic.List<String^>^ value);
}
Example
FTP ftp = new FTP(); //Trial Mode            
//FTP ftp = new FTP("place user name here", "place license key here");
 
// set the name of the FTP server( its URL )
ftp.HostAddress = "ftp.fsz.bme.hu"; // a hungarian university. change this to your ftp server
ftp.UserName = "anonymous"; // replace with your user name
ftp.Password = "user@mail.com"; // replace with your password
 
ftp.DateParseFormats.Add(@"(?<month>\d{2})-(?<day>\d{2})-(?<year>\d{2})\s+(?<hour>\d{2}):(?<minute>\d{2})(?<m>[Aa|Pp][mM])");
Dim ftp As FTP = New FTP() 'Trial Mode
'FTP ftp = new FTP("place user name here", "place license key here");
 
' set the name of the FTP server( its URL )
ftp.HostAddress = "ftp.fsz.bme.hu" ' a hungarian university. change this to your ftp server
ftp.UserName = "anonymous" ' replace with your user name
ftp.Password = "user@mail.com" ' replace with your password
 
ftp.DateParseFormats.Add("(?<month>\d{2})-(?<day>\d{2})-(?<year>\d{2})\s+(?<hour>\d{2}):(?<minute>\d{2})(?<m>[Aa|Pp][mM])")
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

FTP Class
FTP Members