You're lucky because the numbers in your file names are in just the order touch -t
needs.
This command in the terminal will work. You just need to make sure your working directory is set to the folder you want to do:
for f in *; do
t=$(echo $f | sed -E 's/([A-z]*-)|([ ,;])|(\..*)//g' | sed -E 's/(.*)(..)/\1.\2/')
touch -t $t "$f"
done
To break it down:
for f in *
sets the variable f
to the name of each file in the directory, in turn.
do
puts everything until the done
into the for
loop.
t=$(…)
sets the variable t
to the output of the commands in the parentheses.
The first sed
command matches any letters before a -
symbol, the -
;
and the space
symbols, and the file extension, and deletes them.
The second sed
command inserts a period between the mm and ss values, as touch requires.
touch -t $t $f
changes the file modification and creation times to the value of t
on the file f
.
Tested on some dummy files with whatever version of sed
ships with Mavericks.