Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Filtering on ListDirectoryDetails
Message
From
03/01/2011 14:43:17
 
 
To
03/01/2011 14:33:56
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Environment versions
Environment:
VB 9.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01494446
Message ID:
01494477
Views:
31
>>ListDirectoryDetails only returns a string because the return type must be compatable with all FTP servers.
>>So you will have to filter the results. Anything specific that you wanted to filter on ?
>
>I was looking for only .zip files.

Assuming you've got the result from ListDirectoryDetails in a string named 'detailString' then something like this will at least get the relevant lines:
Dim filedetails = detailString.Split(New String() {vbCr & vbLf}, StringSplitOptions.RemoveEmptyEntries)
Dim zipFiles As List(Of String) = (From filedetail In filedetails.Where(Function(name) System.IO.Path.GetExtension(name) = ".zip")filedetail).ToList()
(Hope the VB translation is correct)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform