C# Script to get modified date from URL directory

Posted by Jynx on Stack Overflow See other posts from Stack Overflow or by Jynx
Published on 2010-06-02T21:44:40Z Indexed on 2010/06/02 21:54 UTC
Read the original article Hit count: 149

Filed under:

Hello,

I am fairly new to C# and was hoping for some assistance. I currently use Visual Studio 2008. What I am wanting to do is the following:

I have a server (\backupserv) that runs a RoboCopy script nightly to backup directories from 18 other servers. These directories are then copied down to \backup in directories of their own:

Example: It copies down "Dir1", "Dir2", and "Dir3" from Server1 into \backupserv\backups\Server1 into their own directories (\backupserv\backups\Server1\Dir1, \backupserv\backups\Server1\Dir2, and \backupserv\backups\Server1\Dir3).

It does this for all 18 servers nightly between 12am and 6am. The RoboCopy runs via schedule task. A log file is created in \backupserv\backups\log and is named server1-dir1.log, server1-dir2.log, etc.

What I am wanting to accomplish in C# is the ability to have a 'report' showing the modified date of each text log file. To do this I need to browse the \backupserv\backups\log directory, determine the modified date, and have a report displayed (prefer HTML if possible). Along with the modified date I will be showing more information, but that is later.

Again, I am fairly new to C#, so, please be gentle. I was referred here by another programmer, and was told I would get some assistance.

Thanks in advance. If I have missed any detail please let me know and I will do my best to answer.

© Stack Overflow or respective owner

Related posts about c#