Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/perl
- $| = 1;
- use warnings;
- use strict;
- foreach (qx/exiftool -FileName -CreateDate -T *.jpg/) {
- next if (/\t-/);
- next if (/\d{4}-\d{2}-\d{2}.*/);
- s/:/-/g;
- s/(.+)\t(.+) (.+)/mv -n "$1" "$2_$3.jpg"/;
- print;
- }
- foreach (qx/exiftool -FileName -FileModifyDate -T *.jpg/) {
- next if (/\t-/);
- next if (/\d{4}-\d{2}-\d{2}.*/);
- s/\+\d{2}:\d{2}//;
- s/:/-/g;
- s/(.+)\t(.+) (.+)/mv -n "$1" "$2_$3.jpg"/;
- print;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement