Renaming downloads
Match downloads against
regex patterns. When a download matches all patterns, rename it according to
into:.
This renames all gif files to a UNIX timestamp.
fileext: gif
into: :unixdate:.:fileext:
=
cat.gif âž¡ 1512136516.gif
Moving downloads into different directories
The following example moves all .gif files into the
gifs subdirectory and renames the moved files to a
timestamp.
fileext: gif
into: gifs/:unixdate:.:fileext:
=
cat.gif âž¡ gifs/1512136516.gif
cat.jpg ✘ (no match)
Routing is relative to the selected menu item. When you download a
cat gif using the images context menu, the above
example will save it as
~/downloads/images/gif/946684800.gif.
This advanced example renames downloads based off captured regex
groups — the stuff inside () — and moves
them into different directories.
capture: filename selects
the filename’s capture groups, and finally
into: renames the files based off
them using :$1:,
:$2:, and
:$3:.
// Move downloads based off versions
filename: (.*)\.(v.)\.(tar|gz)
pageurl: example.com
capture: filename
into: :$2:/:$1:.:$3:
=
ubuntu.v1.tar âž¡ v1/ubuntu.tar
debian.v2.gz âž¡ v2/debian.gz
debian.zip ✘ (no match)
Migrating rules from the old version