Execute on file changed
You can execute an action when a file is changed in a directory. The argument filename
is pre-populated for you.
actions:
- title: Print names of new files
shell: "echo Filename: {{ filename }} Filedir: {{ filedir }} Filext: {{ fileext }}"
arguments:
- name: filename
type: unicode_identifier
- name: filedir
type: unicode_identifier
- name: fileext
type: unicode_identifier
execOnFileChangedInDir:
- /home/user/Downloads/
File in dir arguments
Predefined Argument | Example |
---|---|
|
/Downloads/txt1.txt |
|
/Downloads |
|
test1.txt |
|
.txt |
|
100 |
|
0644 |
|
2024-04-27 20:09:42.465235047 +0100 BST |
|
false |
Like all arguments, OliveTin also passes these arguments as environment variables if this is better for your use case.