Hi,

I'm new to c#.net world....
i'm currently in doing a program , that has to take the prefix of the 2 textfile (which has the system time as the prefix)., and compare the time of creation of second file with first file.
example : the filename would be like... logger-12-42-41-193 and logger-12-43-45-454

i didnt know how to do that.....please anyone help me finding out the solution...

thanks in advance

See the documentation of (System.IO.FileInfo) class it would help you

What Ramy said plus specifically look at FileInfo to get the file name, use the name property with the string.split function to break it up. If you are scanning an entire directory then consider looking at the DirectoryInfo's getfiles to get an array of fileinfo.

Thanks Jerry for your extra help (Y)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.