Skip to content

Repository files navigation

File Monitoring Windows Service

A robust, multi-threaded Windows Service built in C# designed to monitor a specific source directory, automatically detect newly added files, handle file-locking scenarios, and safely move/rename them using unique GUIDs to a destination directory with comprehensive logging.

##🚀 Features

  • Real-time Monitoring: Utilizes FileSystemWatcher to instantly detect new file creations.
  • File-Locking Prevention: Built-in retry mechanism to safely wait until source processes finish writing files before moving them.
  • Unique Renaming: Automatically renames incoming files using GUIDs to prevent naming collisions.
  • Dual Operation Mode: Runs as a standard Windows Service in production or interactively via Console mode for testing.
  • Smart Filtering: Automatically filters out temporary files and system noise.
  • Detailed Logging: Maintains persistent logs for all events, successes, and errors.

Tech Stack 🛠️

  • Language: C#
  • Architecture: Windows Service & Background Processing
  • Key Namespaces: System.IO, System.ServiceProcess, System.Configuration

Configuration ⚙️

Configure your target directories in the App.config file:

Installation & Usage

  1. Clone the repository: git clone https://github.com/Amer-css/FileMonitoringService.git

  2. Open the solution in Visual Studio.

  3. Build the project and run it in Console mode for testing, or install it as a Windows Service using InstallUtil.

Author

Amer (@Amer-css)

About

No description or website provided.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages