Click here to Skip to main content
12,294,775 members (59,372 online)
Click here to Skip to main content

Stats

22.4K views
1K downloads
15 bookmarked
Posted

Checksum Verification

, 22 Sep 2011 CPOL
Loop through all files in a folder/subfolders and run a checksum that is stored in a database. E-mail descrepancies and results.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;

namespace ChecksumFiles.Utilities
{
    class Logger
    {

        public static void LogMessage(string logMessage, TextWriter w)
        {
            w.Write("\r\nLog Entry : ");
            w.WriteLine("{0} {1}", DateTime.Now.ToLongTimeString(),
                DateTime.Now.ToLongDateString());
            w.WriteLine("  :");
            w.WriteLine("  :{0}", logMessage);
            w.WriteLine("-------------------------------");
            // Update the underlying file.
            w.Flush();
        }

    }
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

smoore4
Database Developer
United States United States
I am an MBA with a bunch of MS certifications. Technically, I am a DBA, but I do a good deal of sys admin work and web development using .NET. I like to focus on business intelligence, database design, messaging architectures, and web services.

You may also be interested in...

| Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.160525.2 | Last Updated 23 Sep 2011
Article Copyright 2011 by smoore4
Everything else Copyright © CodeProject, 1999-2016
Layout: fixed | fluid