Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Reading the content of a FTP directory
Message
De
16/02/2012 02:35:42
 
 
À
15/02/2012 09:51:22
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Versions des environnements
Environment:
VB 9.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01535473
Message ID:
01535531
Vues:
56
This message has been marked as a message which has helped to the initial question of the thread.
Some Regex variations here:
http://stackoverflow.com/questions/966578/parse-response-from-ftp-list-command-syntax-variations

>I have a FTP class which does pretty much everything. All has worked well so far, until last night when we discovered that a FTP server we were trying to connect to was returning the file list format in a different format.
>
>Basically, a FTP server returns the directory listing like this:
>
>
>total 4696
>drw-rw-rw-   1 user     group           0 Feb  6 15:46 .
>drw-rw-rw-   1 user     group           0 Feb  6 15:46 ..
>-rw-rw-rw-   1 user     group        4825 May  3  2010 Account.png
>-rw-rw-rw-   1 user     group        5242 May  3  2010 Administration.png
>-rw-rw-rw-   1 user     group        4117 Apr 17  2011 Agent.png
>-rw-rw-rw-   1 user     group        1402 Dec 30  2005 AmazonCA.gif
>
>
>However, what I received was this:
>
>
>-rwxrwxrwx   1 owner    group            4480 Feb 15  2:25 8A17T2T1.txt
>
>
>We can see there is an offset starting from the number of bytes.
>
>I can check for a space character at a specific position to determine how to extract the number of bytes, the date and the name. Otherwise, I would apply a lookup based on the offset of that other format.
>
>Anyone would have a comment on this?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform