onfilecreated.adoc 585 B

1234567891011121314151617181920212223242526
  1. [#exec-file-created]
  2. = Execute on file created
  3. You can execute an action when a file is created in a directory. The argument `filename` is pre-populated for you.
  4. [source,yaml]
  5. .`config.yaml`
  6. ----
  7. actions:
  8. - title: Print names of new files
  9. shell: echo {{ filename }}
  10. arguments:
  11. - name: filename
  12. type: unicode_identifier
  13. - name: filedir
  14. type: unicode_identifier
  15. - name: fileext
  16. type: unicode_identifier
  17. execOnFileCreatedInDir:
  18. - /home/user/Downloads/
  19. ----
  20. include::partial$action_execution/onfileindir_arguments.adoc[]