Skip to content

Instantly share code, notes, and snippets.

@asperduti
Last active March 11, 2018 12:41
Show Gist options
  • Save asperduti/e94ed905ea985a84003fd8530a2cbced to your computer and use it in GitHub Desktop.
Save asperduti/e94ed905ea985a84003fd8530a2cbced to your computer and use it in GitHub Desktop.
Bash script to rename all the files with an extension(in this case, MP4). The new name is going to have the creation date.
for f in *.MP4; do mv -n "$f" "VID_$(date -r "$f" +"%Y%m%d_%H%M%S").mp4"; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment