Skip to content

A C# .NET application to keep track of changes to a filesystem.

License

Notifications You must be signed in to change notification settings

jpdillingham/FileHistorian

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

70 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FileHistorian

Build status Build Status License: MIT

A C# .NET application to keep track of changes to a filesystem.

Why?

To keep track of which files are added, deleted and modified on your computer.

Installation

Download the latest release and extract it to the target machine.

The application will run in daemon mode by default, meaning scans will be executed once per day at the configured offset time.

A single scan can be performed using the --run-once argument, allowing for greater scheduling flexibility when combined with the Windows task scheduler or Unix Cron.

To install the application as a service on Windows platforms, execute the following command:

 FileHistorian.exe --install-service

This will install a Windows service named "FileHistorian", which can then be started from the Services console or by issuing the command net start FileHistorian from a command line.

Configuration

All configuration settings are stored in FileHistorian.exe.config, located in the root application directory.

Application

The fileHistorian section contains all application settings:

  <fileHistorian>
   <ScanTime midnightOffset="00:00:00" />
   <Directories>
     <add path="c:\dir\" />
     <add path="c:\directory 2\" />
   </Directories>
 </fileHistorian>

The ScanTime element is used to determine when the daily scan is to be started. The midnightOffset attribute is the time span from midnight of the current day at which the scan is to start.

For example, if you want the scan to begin at 3:30 AM, the ScanTime element would look like the following:

<ScanTime midnightOffset="03:30:00" />

The Directories element contains the list of directories to be scanned, in the order in which they are to be scanned.

Database

The Entity Framework configuration section must be modified to reflect your database configuration. The default configuration is for SQL server:

  <entityFramework>
   <defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework">
     <parameters>
       <parameter value="Server=SQL;Database=FileHistorian;User=FileHistorian;Password=FileHistorian;" />
     </parameters>
   </defaultConnectionFactory>
   <providers>
     <provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
   </providers>
 </entityFramework>

Simply change the connection string to reflect your environment.

Entity Framework is capable of connecting to all sorts of databases, however the application is currently only tooled for SQL server. If you'd like support for a different platform please open an issue listing your desired platform and I'll do my best to incorporate it.

Roadmap

  • Basic scaffolding (service implementation, cross cutting concerns)
  • Data (Entity Framework implementation)
  • Scanning
  • Detailed scan scheduling
  • Diff (scan comparison) functionality/CLI
  • Web service(s)
  • Web UI

About

A C# .NET application to keep track of changes to a filesystem.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages