I have files named "clip-2016-03-01 10;01;14.mp4" and would like to make filename to creation date of file.
Found this thread read creation date from file name and change - batch
for f in *; do
t=$(echo $f | sed -E 's/([A-z]*-)|([ ,;])|(\..*)//g' | sed -E 's/(.*)(..)/\1.\2/')
touch -t $t "$f"
done
But I'm not that used to using terminal.
1. Where do I put the search string to the folder containing the files in terminal?
- Also found another thread suggesting that touch command won't work and that I should use SetFile -d command. https://superuser.com/questions/492342/how-can-i-batch-shift-the-creation-date-of-files-on-os-x-10-6-8