Good day! I’m using Delphi XE and Indy TIdHTTP. Using Get method I get remote directory listing and I need to parse it = get list of files with their sizes and timestamps and distinguish files and subdirectories. Please, is there a good routine to do that? Thank you in advance! Vojtech
Here is the sample:
<head>
<title>127.0.0.1 - /</title>
</head>
<body>
<H1>127.0.0.1 - /</H1><hr>
<pre>
Mittwoch, 30. März 2011 12:01 <dir> <A HREF="/SubDir/">SubDir</A><br />
Mittwoch, 9. Februar 2005 17:14 113 <A HREF="/file.txt">file.txt</A><br />
</pre>
<hr>
</body>
Given the code sample, I guess the fastest way to parse it would be like this:
<pre>...</pre>block containing all the listing lines. Should be easy.<pre>and</pre>into aTStringList. Each line is a file or folder, and the format is very simple.