blob: 05922ef68c1e48120b532238590374338a181c1d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
automv.sh
=========
Usage:
./automv.sh
Prereqs:
Requires bash with the tools:
grep
xargs
find
Setup:
the script searches the directory:
./automv.d/
for any .conf files
Overriding the automv.d location:
If you want to set a different automv.d location setup the:
AUTOMV_DIR
environment variable
automv.d/ conf syntax
=====================
The conf files use the following syntax:
# comments
query=<query>
this is the query you want to use in 'find -regex'
source=<source-dir>
this is the directory you want to search in
target=<target-dir>
this is the target directory to move the found files to
We explicitly parse out those 3 properties (see extract function in script)
!!! Note - do not quote wrap anything - the script expects unwrapped values
example conf
============
# jpegmv.conf
# moves jpeg files downloaded to pictures
query=.*\.jp[e]?g
source=/home/user/Downloads/
target=/home/user/Pictures/
|