[DOCS] Custom Rename Action

Running FileBot from the console, Groovy / FileBot scripting, shell scripts, etc
Post Reply
User avatar
rednoah
The Source
Posts: 16990
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

[DOCS] Custom Rename Action

Post by rednoah » 05 Apr 2017, 09:58

FileBot r4991 now supports custom --action scripts.

  • Standard Rename Actions:
    • MOVE
    • COPY
    • SYMLINK
    • HARDLINK
    • KEEPLINK (i.e. move file and create symlink to new path in it's place)
    • DUPLICATE (i.e. hardlink if possible, copy if necessary)
    • CLONE (i.e. copy-on-write clone)
    • TEST (i.e. do nothing)
    e.g.

    Code: Select all

    --action DUPLICATE
  • Shell Actions:
    Pass an executable as --action parameter. The source path will be passed as first argument, and the destination path will be passed as second argument.

    e.g.

    Code: Select all

    --action /usr/local/bin/scp-to-server
    /usr/local/bin/scp-to-server

    Code: Select all

    #!/bin/sh -xu
    scp -v "$1" "[email protected]:/volume1/files/$2"
    
  • Groovy Actions:
    Pass a Groovy Closure as --action parameter.

    e.g.

    Code: Select all

    --action '{ a, b -> println "$a => $b" }'
:idea: Please read the FAQ and How to Request Help.

Post Reply