exif_filename - a Powerful Command-Line Tool Designed for Automatically Renaming Image Files based on EXIF metadata

CK CK 3422 
Created at
Updated at  
736 0 0

This utility, exif_filename, is a powerful command-line tool designed for automatically renaming image files based on their embedded EXIF metadata. It streamlines the organization of digital photos by leveraging the capture date and optional geographical information directly from the images, providing a structured and informative naming convention.

 

Why Use exif_filename?

exif_filename offers significant advantages for anyone managing a large collection of digital photographs:

  • Automated Organization: Eliminates the manual effort of renaming files, which is prone to human error and inconsistency.
  • Chronological Sorting: Renames files with a date-time stamp (e.g., YYYY_MM_DD_HHhMMmSS), making it effortless to sort photos chronologically within any file explorer.
  • Geographical Context: Enhances filenames by integrating location data (City, State, Country) extracted from geotagged photos, providing immediate context about where a picture was taken without needing to open it.
  • Batch Processing: Efficiently processes multiple image files in a specified directory, handling entire photo libraries with a single command.
  • Standardized Naming: Ensures a consistent naming scheme across all your images, making future retrieval and management much simpler.

 

Technical Requirements and Compatibility

This tool is designed for users comfortable with command-line interfaces and basic system operations. It requires some engineering skills to set up and utilize effectively.

  • Operating System Support:
    • macOS
    • Linux
  • Dependencies: The tool relies on several external components to function correctly:
    • exiftool: A robust utility for reading, writing, and editing meta information in a wide variety of files.
    • Python 3.6+: The scripting language environment for core logic.
    • Geocoder library: A Python library used to convert geographical coordinates (latitude, longitude) from EXIF data into human-readable location names.
  •  

Runtime Example

The following example demonstrates how to use exif_filename to process a directory of images and the typical output you would expect.

exif_filename.sh ~/Downloads/Photos-3-001

This command initiates the renaming process for all applicable image files within the ~/Downloads/Photos-3-001/ directory:

[INFO] EXIF File Renaming Utility v1.0.0
[INFO] Target directory: /Users/chunkang/Downloads/Photos-3-001 2
[INFO] Force mode: true

[INFO] Checking dependencies...
[INFO] exiftool is available
[INFO] Python 3.6+ is available
[INFO] Geocoder library is available

[INFO] Processing files...
[OK] Renamed: 2026_01_07_21h31m38s_1.jpg -> 2026_01_07_21h31m38s.jpg
[OK] Renamed: 2026_01_07_20h29m24s_Irvine_California_US_1.jpg -> 2026_01_07_20h29m24s_Irvine_California_US.jpg
[OK] Renamed: 2026_01_07_21h26m52s_1.jpg -> 2026_01_07_21h26m52s.jpg
[OK] Renamed: 2026_01_07_21h26m48s_1.jpg -> 2026_01_07_21h26m48s.jpg
[OK] Renamed: 2026_01_07_20h29m10s_Irvine_California_US_1.jpg -> 2026_01_07_20h29m10s_Irvine_California_US.jpg
[OK] Renamed: 2026_01_17_22h40m50s_North_Tustin_California_US_1.jpg -> 2026_01_17_22h40m50s_North_Tustin_California_US.jpg
[OK] Renamed: 2026_01_07_20h36m16s_Irvine_California_US_1.jpg -> 2026_01_07_20h36m16s_Irvine_California_US.jpg
[OK] Renamed: 2026_01_07_20h37m50s_Irvine_California_US_1.jpg -> 2026_01_07_20h37m50s_Irvine_California_US.jpg
[OK] Renamed: 2026_01_07_20h20m33s_Irvine_California_US_1.jpg -> 2026_01_07_20h20m33s_Irvine_California_US.jpg
[OK] Renamed: 2026_01_07_21h26m20s_1.jpg -> 2026_01_07_21h26m20s.jpg
[OK] Renamed: 2026_01_07_21h26m30s_1.jpg -> 2026_01_07_21h26m30s.jpg
[OK] Renamed: 2026_01_17_22h21m50s_North_Tustin_California_US_1.jpg -> 2026_01_17_22h21m50s_North_Tustin_California_US.jpg
[OK] Renamed: 2026_01_17_22h22m02s_North_Tustin_California_US_1.jpg -> 2026_01_17_22h22m02s_North_Tustin_California_US.jpg
[OK] Renamed: 2026_01_07_21h26m45s_1.jpg -> 2026_01_07_21h26m45s.jpg
[OK] Renamed: 2026_01_07_20h38m33s_Irvine_California_US_1.jpg -> 2026_01_07_20h38m33s_Irvine_California_US.jpg
[OK] Renamed: 2026_01_07_20h36m12s_Irvine_California_US_1.jpg -> 2026_01_07_20h36m12s_Irvine_California_US.jpg
[OK] Renamed: 2026_01_17_22h22m37s_North_Tustin_California_US_1.jpg -> 2026_01_17_22h22m37s_North_Tustin_California_US.jpg
[OK] Renamed: 2026_01_07_21h31m19s_1.jpg -> 2026_01_07_21h31m19s.jpg
[OK] Renamed: 2026_01_07_21h26m12s_1.jpg -> 2026_01_07_21h26m12s.jpg

==========================================
           Processing Summary
==========================================
Total files found:  19
Files renamed:      19
Files skipped:      0
Files failed:       0
==========================================

Output Breakdown:

  • Version and Target: Confirms the tool's version and the specific directory being processed.
  • Force Mode: Indicates that the tool will proceed with renaming, potentially overwriting existing non-conflicting filenames.
  • Dependency Check: Verifies that all necessary external tools and libraries (exiftool, Python 3.6+, Geocoder) are installed and accessible, ensuring a smooth operation.
  • File Processing: Displays a real-time log of each file being renamed.
    • 2026_01_07_21h31m38s.jpg: This format indicates a filename derived solely from the image's EXIF capture date and time (Year_Month_Day_HourhMinute_Second).
    • 2026_01_07_20h29m24s_Irvine_California_US.jpg: This format includes geographical information (City_State_Country) appended to the date-time stamp, indicating the photo was geotagged.
  • Summary Report: Provides a comprehensive overview of the processing operation, detailing the total number of files discovered, how many were successfully renamed, and if any were skipped or failed. This gives a clear indication of the batch operation's success.

 

You can download it at https://github.com/chunkang/exif_filename/releases/tag/release%2Fv1.0.0 

Tags CLI EXIF Geo Code Geo Location Geographical Information exif_filename Facebook X
Comments 0
Similar posts
  1. Adding a Personal Touch - Embed Your Copyright into Your Nikon’s EXIF Data
    2,009
  2. FNC Batch Renames Digital Photos by Date
    1,889
  1. Meta Unveils Muse Charm: The Keychain AI Assistant That Could Replace Your Smartwatch
    1,062
  2. Why iCloud Passwords is useful?
    810
  3. The Correlation between Income Level and Television Viewing Time
    2,102
  4. Asus Chromebook (CB3-451) Factory Reset
    3,546
  5. Why Maintenance is never ending in the Interenet-based Service?
    4,143
  6. The AI Revolution of 2024: Gemini vs. ChatGPT-4o
    2,010
  7. The quality of DVD-Video
    1,826
  8. DVD stands for...
    1,770
  9. What is DVD?
    1,930
Recently updated
  1. Guide to Updating Company Legal Name on D-U-N-S Profile (AAA to BBB)
    107
  2. Health Insurance Options and Monthly Costs for a Family of Four in the US (Without Employer Coverage)
    473
  3. Essential US Business Setup: Automated Payroll, Benefits, Tax Services, and Monthly Costs
    139
  4. YouTube Language Usage in India: Comprehensive Statistics and Data Breakdown
    787
  5. India's Linguistic Landscape: Top Languages, Regional Distribution, and English Usage
    785
  6. Decoding Global TikTok Revenue: Monetization Trends, Market Tiers, and Social Commerce Growth
    984
  7. Countries Where Fortune-Telling and Amulets Are Strictly Illegal
    142
  8. Global YouTube Usage Analysis: Top 100 Countries by User Population
    500
  9. Good Company to Work For, but Pretty Pathetic once you Look Inside
    1,762
  10. Discovering OpenBugBounty: A Free Tool for Website Security Insights
    1,929
  11. Pre-Departure Google Workspace Personal Data Cleanup
    3,117
  12. The Harmful Effects of Squeezing Blemishes: Why You Should Avoid It
    1,888
  13. Finding Your Path to Clear Skin: The Best Way to Treat Acne
    2,152
  14. Choosing the Right Cosmetics and Cleansers for Acne-Prone Skin
    2,278
  15. Why Does Vietnamese Cable TV Have Almost No Ads? A Look at the Rules
    3,084
  16. In 2026, Advertising Is Converging on the TV Screen - 5 Opportunities OTT Operators Should Be Watching
    4,072
  17. Musk's Masterclass: Prioritizing, Delegating & Verifying
    798
  18. Life is Short: HubSpot Founder's Cliff-Edge Wisdom for Leaders
    3,470
  19. The Making of OpenAI: Birth, Battles, and Breakthroughs
    897
  20. Brazil's Digital & Demographic Deep Dive: Economy & Top Streaming Services
    1,438
  21. World Population Top 30 (2016-2025)
    1,071
  22. SouthEast Asia Advertising Market - Comprehensive Analysis by Country, Company, Platform & Revenue
    1,822
  23. Comprehensive Report on Portugal: Demographics, Digital Usage, and Top Streaming Companies
    940
  24. Mongolia Unpacked: Demographics, Digital Economy, and Leading Streaming Services
    1,589
  25. Italy: A Comprehensive Guide to Demographics, Digital Trends, and Its Top 10 Video Streaming Companies
    939
  26. Spain: Demographics, Digital Usage, Economic Insights & Top 10 Streaming Services
    1,372
  27. France's Digital Economy: Demographics, Trends, and Streaming Leaders
    898
  28. Germany's Digital Deep Dive: Demographics, Internet Usage, Market Trends, and Top 10 Video Streaming Powerhouses
    945
  29. United Kingdom: Demographics, Digital Life, and Streaming's Top 10 Players
    848
  30. Russia's Digital Blueprint: Economy, Demographics, and Streaming Landscape
    1,064
  31. Singapore's Top 10 Video Streaming Companies
    1,001
  32. Canada's Digital Pulse: Demographics, Connectivity & Top 10 Streaming Services Unveiled
    912
  33. Korea's Streaming Story: Top 10 Platforms in a Digital Nation
    1,970
  34. Malaysia's Top 10 Video Streaming Companies 2026
    1,433
  35. Indonesia's Top 10 Video Streaming Companies
    1,504
  36. Japan's Top 10 Video Streaming Companies
    993
  37. United States's Top 10 Video Streaming Companies
    947
  38. The Evolving Role of Engineering Organizations in the AI Era
    3,106
  39. Problem-Solving Narratives in Startup Programs
    769
  40. Vietnamese Top 10 Video Streaming Companies 2026
    1,910
  41. Thailand's Top 10 Video Streaming Companies 2026
    1,832
  42. Phillippine's Top 10 Video Streaming Companies 2026
    1,469
  43. Business Structure Comparison: Sole Proprietorship vs S-Corporation
    8141
  44. Affordable Payroll Solutions for Family-Based Businesses in the US
    804
  45. Vietnam Television (aka VTV)
    1,165
  46. Do we know what causes endometrial cancer?
    1,749
  47. What should you ask your physician about endometrial cancer?
    2,203
  48. How is cancer of the cervix treated?
    2,201