Skip to content
This repository has been archived by the owner on May 2, 2020. It is now read-only.

Commit

Permalink
Committing the project
Browse files Browse the repository at this point in the history
I wrote this on the train so I'm just committing it now that I'm home
  • Loading branch information
ahrenstein committed Mar 14, 2015
1 parent 95ca32e commit 4fc7f9c
Show file tree
Hide file tree
Showing 20 changed files with 1,428 additions and 0 deletions.
12 changes: 12 additions & 0 deletions README.mediawiki
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
=== Windows Duplicate File Finder ===
The Windows Duplicate File Finder recursively searches the selected directory for duplicate files and saves the results to a text file on the user's desktop.

=== How does it work? ===
It works by recursively scanning a directory for all files. It them calculates the md5sum of the files, and checks for duplicates. This is done by storing the md5sums in a string based List object array, so it can be looped through to look for comparisons.

=== Known issues ===
*1) If you select a directory with hidden or system files (sadly such as %HOMEPATH%\Documents) you will get an access denied error
*2) All string arrays and string List objects are stored in memory, and the program has to iterate through them. The more files you have in the scanned directory, the longer this will take. Sadly I don't have a progress bar or indicator right now. A message dialog box will appear at the start and at the end of the scan.
=== To Do ===
*1) See repository issues at: https://github.com/ahrenstein/Windows-Duplicate-File-Finder/labels/enhancement
30 changes: 30 additions & 0 deletions Windows Duplicate File Finder.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2013
VisualStudioVersion = 12.0.31101.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WindowsDuplicateFileFinder", "Windows Duplicate File Finder\WindowsDuplicateFileFinder.csproj", "{96EEB1D2-B8DE-4883-9929-89F8B726D6B3}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{7467D725-9326-4BD0-81DE-79D251769A2D}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WindowsDuplicateFileFinder.Common", "WindowsDuplicateFileFinder.Common\WindowsDuplicateFileFinder.Common.csproj", "{8339A5A1-9839-4B5D-9276-D39A4710FEC6}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{96EEB1D2-B8DE-4883-9929-89F8B726D6B3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{96EEB1D2-B8DE-4883-9929-89F8B726D6B3}.Debug|Any CPU.Build.0 = Debug|Any CPU
{96EEB1D2-B8DE-4883-9929-89F8B726D6B3}.Release|Any CPU.ActiveCfg = Release|Any CPU
{96EEB1D2-B8DE-4883-9929-89F8B726D6B3}.Release|Any CPU.Build.0 = Release|Any CPU
{8339A5A1-9839-4B5D-9276-D39A4710FEC6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8339A5A1-9839-4B5D-9276-D39A4710FEC6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8339A5A1-9839-4B5D-9276-D39A4710FEC6}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8339A5A1-9839-4B5D-9276-D39A4710FEC6}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
6 changes: 6 additions & 0 deletions Windows Duplicate File Finder/App.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
</startup>
</configuration>
35 changes: 35 additions & 0 deletions Windows Duplicate File Finder/Program.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
/* ----------------------------------------------------------------------
// <copyright file="Program.cs" company="Ahrenstein">
// Copyright (c) 2015 Ahrenstein., All Rights Reserved.
// Authors:
// Matthew Ahrenstein 2015 @ahrenstein
// </copyright>
// ----------------------------------------------------------------------
//
// WindowsDuplicateFileFinder
// OPEN SOURCE PROJECT! Use is subject to license terms in LICENSE.txt
// DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*/

using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace WindowsDuplicateFileFinder
{
static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new frmMain());
}
}
}
48 changes: 48 additions & 0 deletions Windows Duplicate File Finder/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
/* ----------------------------------------------------------------------
// <copyright file="AssemblyInfo.cs" company="Ahrenstein">
// Copyright (c) 2015 Ahrenstein., All Rights Reserved.
// Authors:
// Matthew Ahrenstein 2015 @ahrenstein
// </copyright>
// ----------------------------------------------------------------------
//
// WindowsDuplicateFileFinder
// OPEN SOURCE PROJECT! Use is subject to license terms in LICENSE.txt
// DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*/
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("Windows Duplicate File Finder")]
[assembly: AssemblyDescription("A tool that uses MD5 sums to find duplicate files in a scanned directory")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Ahrenstein")]
[assembly: AssemblyProduct("Windows Duplicate File Finder")]
[assembly: AssemblyCopyright("Copyright © Ahrenstein 2015")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]

// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("df971024-d68e-406b-8fa6-02acaebd43b2")]

// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyFileVersion("1.0.0.0")]
54 changes: 54 additions & 0 deletions Windows Duplicate File Finder/Properties/AssemblyVersion.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
/**
* Copyright (c) 2014 Nevec Networks LLC., All Rights Reserved.
* INTERNAL/PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*/
using System;
using System.Reflection;

namespace WindowsDuplicateFileFinder
{
/// <summary>
/// Static class to build the engine version string.
/// </summary>
public class AssemblyVersion
{
/**
* Fields
*/
public static string _NAME;
public static string _VERSION;
public static string _BUILD;
public static string _BUILD_DATE;
public static string _COPYRIGHT;

#if DEBUG
public static string _DEBUG = "DEBUG_BUILD";
#else
public static string _DEBUG = "";
#endif
public static string _VERSION_STRING;

/**
* Methods
*/
/// <summary>
/// Initializes static members of the AssemblyVersion class.
/// </summary>
static AssemblyVersion()
{
Assembly asm = Assembly.GetExecutingAssembly();
AssemblyProductAttribute asmProd = asm.GetCustomAttributes(typeof(AssemblyProductAttribute), false)[0] as AssemblyProductAttribute;
AssemblyDescriptionAttribute asmDesc = asm.GetCustomAttributes(typeof(AssemblyDescriptionAttribute), false)[0] as AssemblyDescriptionAttribute;
AssemblyCopyrightAttribute asmCopyright = asm.GetCustomAttributes(typeof(AssemblyCopyrightAttribute), false)[0] as AssemblyCopyrightAttribute;
DateTime buildDate = new DateTime(2000, 1, 1).AddDays(asm.GetName().Version.Build).AddSeconds(asm.GetName().Version.Revision * 2);
_NAME = asmProd.Product;
_VERSION = asm.GetName().Version.Major + "." + asm.GetName().Version.Minor + "." + asm.GetName().Version.Revision;
_BUILD = string.Empty + asm.GetName().Version.Build;
_BUILD_DATE = buildDate.ToShortDateString() + " @ " + buildDate.ToShortTimeString();
_COPYRIGHT = asmCopyright.Copyright;

_VERSION_STRING = AssemblyVersion._NAME + " " + AssemblyVersion._DEBUG + " " + AssemblyVersion._VERSION + " build " + AssemblyVersion._BUILD;
}
} // public class AssemblyVersion
} // namespace SecurePassword.GeneratorLite
63 changes: 63 additions & 0 deletions Windows Duplicate File Finder/Properties/Resources.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

117 changes: 117 additions & 0 deletions Windows Duplicate File Finder/Properties/Resources.resx
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>
Loading

0 comments on commit 4fc7f9c

Please sign in to comment.