2014-08-02 I have a directory with a bunch of files in this style (excerpt): 01-foo_10 03-foo_8 06-foo_19 09-foo_19 01-foo_11 03-foo_9 06-foo_7 09-foo_20 01-foo_12 03-foo 06-foo_8 09-foo_21 01-foo_13 04-foo_10 06-foo_9 09-foo 01-foo_14 04-foo_11 06-foo 10-foo_11 01-foo_15 04-foo_12 07-foo_10 10-foo_12 01-foo_2 04-foo_13 07-foo_11 10-foo_13 01-foo_3 04-foo_14 07-foo_12 10-foo_14 01-foo_4 04-foo_15 07-foo_13 10-foo_15 01-foo_5 04-foo_16 07-foo_14 10-foo_16 01-foo_6 04-foo_17 07-foo_15 10-foo_17 01-foo_7 04-foo_5 07-foo_16 10-foo_18 01-foo_8 04-foo_6 07-foo_17 10-foo_19 01-foo_9 04-foo_7 07-foo_18 10-foo_20 01-foo 04-foo_8 07-foo_19 10-foo_21 02-foo_10 04-foo_9 07-foo_8 10-foo 02-foo_11 04-foo 07-foo_9 11-foo_12 02-foo_12 05-foo_10 07-foo 11-foo_13 02-foo_13 05-foo_11 08-foo_10 11-foo_14 02-foo_14 05-foo_12 08-foo_11 11-foo_15 02-foo_15 05-foo_13 08-foo_12 11-foo_16 02-foo_3 05-foo_14 08-foo_13 11-foo_17 02-foo_4 05-foo_15 08-foo_14 11-foo 02-foo_5 05-foo_16 08-foo_15 12-foo_13 02-foo_6 05-foo_17 08-foo_16 12-foo_14 02-foo_7 05-foo_18 08-foo_17 12-foo_15 02-foo_8 05-foo_6 08-foo_18 12-foo_16 The semantics are: part number, dash, ``foo'', underscore, set number. I.e. the files ``*_4'' belong to the same set. The number of parts per set changes. Of course, I didn't wanted to sort the files manually. But hey, this is why we use command line to control computers, right? This is the one-liner that grouped the files accordingly. for i in `seq 1 21` ; do mkdir disk-$i mv *"_$i" disk-$i/ done (I write such commands directly down, but often I put an `echo' before the destructive `mv' call, to check if the result will be as desired.) Afterwards, I used `emv' [0] (What a great tool!) to rename the files. Emv allows to manipulate filenames (or whole paths) using the full powers of vi. It moves the files accordingly (but does not create parent directories). I could have used emv already to move the files if I would only have created the directories be- forehand. Wrote the script `a2mp3', which converts arbitrary video/audio formats that avconv understands to MP3. (Hey, I like to write all these little scripts these days!) #!/bin/sh for i do avconv -i "$i" "${i%.*}.mp3" done To extract some media file's creation time, from its metadata, you can use avprobe(1), which comes with avconv. I used it to bring a set of files with random names back in the original order (as they were extracted): for i in *; do printf $i avprobe "$i" 2>&1 | grep creation_time done [0] http://www.i0i0.de/toolchest/emv http://marmaro.de/lue/ markus schnalke