How to parse a directory of logfiles

  • Thread starter Thread starter Xagon
  • Start date Start date
X

Xagon

Hi,

I'm a newbie to C#, so forgive me if this is a dumb question.

What I want to do is parse a directory of IRC logfiles and dump all the .jpg
and .gif links to a text file. If I could get a single filename, I could
load it into a richedit control and do the parsing there but
Directory.GetFiles doesn't seem to do what I want.

Any tips on how to accomplisg this task?

TIA.
 
Hello Xagon,

What's the problem? Directory.GetFiles returns you array of the files in
the current directory which you can open and paste content into you control.

Did you look at the MSDN sample of Directory.GetFiles?

X> Hi,
X>
X> I'm a newbie to C#, so forgive me if this is a dumb question.
X>
X> What I want to do is parse a directory of IRC logfiles and dump all
X> the .jpg and .gif links to a text file. If I could get a single
X> filename, I could load it into a richedit control and do the parsing
X> there but Directory.GetFiles doesn't seem to do what I want.
X>
X> Any tips on how to accomplisg this task?
X>
X> TIA.
X>
---
WBR,
Michael Nemtsev :: blog: http://spaces.msn.com/laflour

"At times one remains faithful to a cause only because its opponents do not
cease to be insipid." (c) Friedrich Nietzsche
 
Michael Nemtsev said:
Hello Xagon,

What's the problem? Directory.GetFiles returns you array of the files in
the current directory which you can open and paste content into you
control.

Did you look at the MSDN sample of Directory.GetFiles?

Hi Michael,

Thanks, I've got my program wormking (nearly). All I need to do is trim the
leading text, which is the timestamp and who posted the link. This text is
of varying length. How would I go about doing it? A code sample would be
nice :-)
 
Back
Top