Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Filtering on ListDirectoryDetails
Message
De
03/01/2011 14:43:17
 
 
À
03/01/2011 14:33:56
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Versions des environnements
Environment:
VB 9.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01494446
Message ID:
01494477
Vues:
32
>>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)
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform