Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Proper format to read FTP directory
Message
From
10/05/2012 08:00:04
 
 
General information
Forum:
ASP.NET
Category:
Other
Environment versions
Environment:
VB 9.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01543372
Message ID:
01543405
Views:
26
>Ummm.
IEnumerable<FTPInfo> result = typeA.Select(x =>
>            {
>                string[] line = ((string)x).Split((char[])null, StringSplitOptions.RemoveEmptyEntries).Take(9).ToArray();
>                return new FTPInfo
>                {
>                    File = x.Substring(x.IndexOf(line.Last())),
>                    Size = line[4],
>                    Month = line[5],
>                    Day = line[6],
>                    YearOrTime = line[7]
>                };
>            });	
(I know. This won't work either if the first word of the file name occurs earlier in the string. I don't want to play any more :-{ )


Not meant to play - just meant to say that string.Split() is not a waterproof solution in this case
Gregory
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform