Discussion
Loading...

Post

Log in
  • About
  • Code of conduct
  • Privacy
  • Users
  • Instances
  • About Bonfire
Jan Wildeboer 馃樂:krulorange:
Jan Wildeboer 馃樂:krulorange:
@jwildeboer@social.wildeboer.net  路  activity timestamp 3 weeks ago

Hm. Does anyone have a little shell script that does this:

- Find all picture files
- Check if it has EXIF data and if yes, rename the file to YYYYMMDD_HHMMSS using the EXIF creation date
- If NOT, rename the file to the same pattern, but use the filesystem last modified date

I have `for img in $(ls *.[Jj][Pp][Gg] 2> /dev/null); do exiv2 -r'%Y%m%d_%H%M%S_'"$(tmp=${img%%.*};echo ${tmp##*_})" rename "$img" ; done`whicj does the first part, but fails when no EXIF

#HomeLab #SysAdminLife @homelab

  • Copy link
  • Flag this post
  • Block

bonfire.cafe

A space for Bonfire maintainers and contributors to communicate

bonfire.cafe: About 路 Code of conduct 路 Privacy 路 Users 路 Instances
Bonfire social 路 1.0.1-alpha.40 no JS en
Automatic federation enabled
Log in
  • Explore
  • About
  • Members
  • Code of Conduct