Renaming media files in folders

PHOTO EMBED

Sun Jul 02 2023 18:58:55 GMT+0000 (Coordinated Universal Time)

Saved by @ialmeida #bash

rename -n -d 's/(\d{4})-(\d{2})-(\d{2}) (\d{2})\.(\d{2})\.(\d{2})/$1$2$3_$4$5$6/' <files>
# -n to dry run
# -d to only rename files, not folders
content_copyCOPY

renaming files in folders from "yy-mm-dd hh:mm:ss.ext" to "yymmdd_hhmm.ext"