Execute on file created

You can execute an action when a file is created in a directory. The argument filename is pre-populated for you.

config.yaml
actions:
  - title: Print names of new files
    shell: echo {{ filename }}
    arguments:
      - name: filename
        type: unicode_identifier
      - name: filedir
        type: unicode_identifier
      - name: fileext
        type: unicode_identifier

    execOnFileCreatedInDir:
      - /home/user/Downloads/

File in dir arguments

Predefined Argument Example

filepath

/Downloads/txt1.txt

filedir

/Downloads

filename

test1.txt

fileext

.txt

filesizebytes

100

filemode

0644

filemtime

2024-04-27 20:09:42.465235047 +0100 BST

fileisdir

false

Like all arguments, OliveTin also passes these arguments as environment variables if this is better for your use case.