rename 's/(.*) - (.*)\.(.*)/$2 - $1.$3/' *
What it does: takes a file which is split into two (or more chunks) by
- , and 'rotates' it - ie. moves the last chunk to the beginning.
Related ones:
rename 's/, The/_____/' *; rename 's/^/The /' *_____*; rename 's/_____//' *
rename 's/, A/_____/' *; rename 's/^/A /' *_____*; rename 's/_____//' *for
(
Read more... )