title: How to fix "touch: out of range or illegal time specification" with touch t- function
body: <p>I have lost the creation date of 500 photos and clips when I transmitted them from my camera to my mac. Fortunately the creation dates are still in the files' name (like P_20180615_131048_vHDR_Auto_HP.jpg ; V_20180616_071110_vHDR_Auto_OC0.mp4) 
  So I read through some guidances from the internet to make the below  scripts to help me batch changing the dates from the name. As I am a newbie of shell scripting, I don't know what I've done wrong.</p>
  
  <p>for f in *; do
      t=“${f:2:4}${f:6:2}${f:8:2}${f:11:2}${f:13:2}.${f:15:2}”
      touch -t $t "$f"
  done</p>
  
  <p>I put the date in the format that touch needs(201806151310.48), but still get the same error "out of range or illegal time specification: [[CC]YY]MMDDhhmm[.SS] [[CC]YY]MMDDhhmm[.SS]" 
  I've been tried to put a date in the script directly 
  touch like -t 201806151610.48 $f and it worked. It seems that I cannot apply $t and $f both variables at the same time under touch function.
  I would be very grateful if anyone can help me. </p>