Use this command to install inotifywait with WinGet:
winget install --id=thekid.inotifywait -e
inotifywait is a cross-platform file system monitoring tool designed to track changes to files and directories on Windows. Ported from the popular Linux utility inotify-tools, it enables users to detect events such as file creation, modification, deletion, and movement in real time.
Key Features:
Recursive file watching: Monitor all files and subdirectories within a specified directory.
Continuous monitoring: Run indefinitely until terminated (e.g., via Ctrl+C) using the -m option.
Event filtering: Watch specific types of events (create, modify, delete, move) or monitor all changes by default.
Quiet mode: Suppress event information output using the -q flag.
Customizable output format: Define output templates using placeholders like %e (event name), %f (file name), and %w (path).
Regular expression filters: Exclude or include events based on filename patterns using --exclude, --excludei, --include, and --includei.
Audience & Benefit:
Ideal for system administrators, developers, and anyone requiring real-time file system monitoring. inotifywait enables users to automate workflows by reacting to file changes programmatically, enhancing efficiency and reducing manual intervention.
Installable via winget, the tool provides a powerful yet straightforward solution for tracking file activity on Windows.
The command line arguments are similar to the original one's:
$ inotifywait.exe
Usage: inotifywait [options] path [...]
Options:
-h/--help: Shows this usage
-v/--version: Shows version number
-r/--recursive: Recursively watch all files and subdirectories inside path
-m/--monitor: Keep running until killed (e.g. via Ctrl+C)
-q/--quiet: Do not output information about actions
-e/--event list: Which events (create, modify, delete, move) to watch, comma-separated. Default: all
--format format: Format string for output.
--exclude: Do not process any events whose filename matches the specified regex
--excludei: Ditto, case-insensitive
--include: Only process events whose filename matches the specified regex
--includei: Ditto, case-insensitive
Formats:
%e : Event name
%f : File name
%w : Path name
%T : Current date and time
%% : Percent sign
Contributing
Pull requests welcome ☺️
Compiling
If you have Cygwin installed, just run sh build.sh in this directory. This will create the executable, inotifywait.exe.