Archive

Archive for October, 2014

Rename files based on their creation date

19/10/2014 1 comment


#!/bin/bash
for i in Filmy/*.mp4
do
mod_date=$(stat -c "%y" "$i"|sed 's/\..*$//'|sed 's/\ /\_/'|tr -d ':'|tr -d '-')
mv "$i" "$mod_date".MP4
done

Advertisements
Categories: Uncategorized