Crates.io | filewatch |
lib.rs | filewatch |
version | 0.1.1 |
source | src |
created_at | 2022-10-16 01:55:28.962439 |
updated_at | 2022-10-16 04:03:09.000624 |
description | A tool for monitoring files to perform actions on |
homepage | |
repository | https://github.com/kylegrantlucas/filewatch |
max_upload_size | |
id | 689284 |
size | 38,088 |
A cli tool for performing actions on sets of files.
cargo install filewatch
filewatch [OPTIONS] <FILE>
The rule file is a yaml file with the following format:
rename_and_move_test_files:
interval:
actions:
- action: copy
match_regex: .*/testfile_.*
watch_dir: ./fixtures/test_data
destination_dir: ./fixtures/test_data/backup
- action: rename
match_regex: test_[0-9]/testfile_(.*)
rename_pattern: /renamed_$1
watch_dir: ./fixtures/test_data
- action: move
match_regex: .*/renamed_.*
watch_dir: ./fixtures/test_data
destination_dir: ./fixtures/test_data/moved
- action: delete
match_regex: testfile_.*
watch_dir: ./fixtures/test_data/backup
-h, --help
Prints help information
-V, --version
Prints version information
-v, --verbose
Sets the level of verbosity
--dry-run
Runs the program without performing any actions
filewatch
is distributed under the terms of the MIT license.