Home > Uncategorized > Rename files based on their creation date

Rename files based on their creation date


#!/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

Categories: Uncategorized
  1. 17/11/2014 at 21:16

    Ciekawy pomysł🙂

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: