Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/benblamey/when_changed
Windows utility to run a command when a file (or files) change
https://github.com/benblamey/when_changed
Last synced: 16 days ago
JSON representation
Windows utility to run a command when a file (or files) change
- Host: GitHub
- URL: https://github.com/benblamey/when_changed
- Owner: benblamey
- License: mit
- Created: 2014-07-11T13:07:39.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2021-03-19T13:48:01.000Z (over 3 years ago)
- Last Synced: 2024-08-01T05:19:11.597Z (3 months ago)
- Language: C#
- Size: 17.6 KB
- Stars: 86
- Watchers: 4
- Forks: 14
- Open Issues: 5
-
Metadata Files:
- Readme: README
- License: LICENSE
Awesome Lists containing this project
README
when_changed
============Runs a Command when a file changes (Windows only)
usage:
when_changed (file path) (command) (optional-parameters)when_changed C:\somedir\foo.txt myapp.exe
when_changed C:\somedir\*.txt myapp.exe
when_changed C:\somedir\**.txt myapp.exe (recursive)
when_changed C:\somedir\* myapp.exe
when_changed C:\somedir\** myapp.exe (recursive)
when_changed fileincurrentdir.txt myapp.exe
when_changed C:\somedir\foo.txt myapp.exe bar wibble 123
when_changed C:\somedir\*.txt myapp.exe %file%Notes:
- Press 'F' to force the command to run.
- The utility will wait for the command to exit before running it again.
- The utility will will re-run the command if file changes whilst command is running.
- Beware of creating an infinite loop!
- (file path) must be a file path with wildcards -- not a directory.
- The search is recursive if the filename contains a double-asterisk ** (wildcards in directory names not supported.)
- Include a %file% parameter to pass the full path of the changed file to the target application. **Note this parameter omitted when 'force running' the target application**. (thanks to borconi)feedback to: blamey.ben (at) gmail.com
See http://benblamey.com/code for binaries.