Hundreds of images need to be renamed with a terminal command using regex on MacOS 10.9 Mavericks.
The files are named this way:
0045AW489R3T(IPCAM)_0_20131124101245_931.jpg
0021DF025C8E(IPCAM)_0_20131127101721_44591.jpg
389223GT4Z6W(IPCAM)_0_20131128103423_7893282.jpg
They need to be renamed to this:
2013-11-24 10-12-45.jpg
2013-11-27 10-17-21.jpg
2013-11-28 10-34-23.jpg
Can anyone please show me how to do it?
for a in *; do b=$(echo $a | perl -pe 's/^\d(\d\d)/\1/'); mv "$a" "$b"; done