473,394 Members | 1,750 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

How to parse a directory of logfiles

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.
Jun 19 '06 #1
2 1893
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
Jun 19 '06 #2

"Michael Nemtsev" <ne*****@msn.com> wrote in message
news:17***************************@msnews.microsof t.com...
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 :-)
Jun 20 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: gopi | last post by:
when installing db2, it only asks for installation directory and does not ask where it is going to store data files. how can i change the default directory after installation.
2
by: jabernet | last post by:
We decided to root for a backup strategy using online incremental backups which include the log files (avail since DB v8.2). Now I wondered, if DB2 automtically deletes the archived logfiles after...
0
by: Knokmans | last post by:
My config: - using DB2 v9 linux/intel non-partioned - logarchive is done by userexit - archived logfiles are cleared from disk after x hours - no backups are taken from this database, because we...
1
by: bhumikas | last post by:
Hi, I am new to this Perl. I need a script which searches for a keyword in a Directory which contains the subdirectories...The subdirectories will contain the logfiles. I need to search the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.