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

CK CK 3398 
Created at
Updated at  
671 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
    1,951
  2. FNC Batch Renames Digital Photos by Date
    1,821
  1. Meta Unveils Muse Charm: The Keychain AI Assistant That Could Replace Your Smartwatch
    467
  2. Why iCloud Passwords is useful?
    374
  3. The Correlation between Income Level and Television Viewing Time
    1,915
  4. Asus Chromebook (CB3-451) Factory Reset
    3,324
  5. Why Maintenance is never ending in the Interenet-based Service?
    3,816
  6. The AI Revolution of 2024: Gemini vs. ChatGPT-4o
    1,944
  7. The quality of DVD-Video
    1,760
  8. DVD stands for...
    1,711
  9. What is DVD?
    1,872
Recently updated
  1. YouTube Language Usage in India: Comprehensive Statistics and Data Breakdown
    142
  2. India's Linguistic Landscape: Top Languages, Regional Distribution, and English Usage
    157
  3. Decoding Global TikTok Revenue: Monetization Trends, Market Tiers, and Social Commerce Growth
    199
  4. Countries Where Fortune-Telling and Amulets Are Strictly Illegal
    46
  5. Global YouTube Usage Analysis: Top 100 Countries by User Population
    199
  6. Good Company to Work For, but Pretty Pathetic once you Look Inside
    1,201
  7. Discovering OpenBugBounty: A Free Tool for Website Security Insights
    1,463
  8. Pre-Departure Google Workspace Personal Data Cleanup
    2,572
  9. The Harmful Effects of Squeezing Blemishes: Why You Should Avoid It
    1,803
  10. Finding Your Path to Clear Skin: The Best Way to Treat Acne
    2,055
  11. Choosing the Right Cosmetics and Cleansers for Acne-Prone Skin
    2,176
  12. Why Does Vietnamese Cable TV Have Almost No Ads? A Look at the Rules
    2,482
  13. In 2026, Advertising Is Converging on the TV Screen - 5 Opportunities OTT Operators Should Be Watching
    3,366
  14. Musk's Masterclass: Prioritizing, Delegating & Verifying
    698
  15. Life is Short: HubSpot Founder's Cliff-Edge Wisdom for Leaders
    3,059
  16. The Making of OpenAI: Birth, Battles, and Breakthroughs
    817
  17. Brazil's Digital & Demographic Deep Dive: Economy & Top Streaming Services
    1,240
  18. World Population Top 30 (2016-2025)
    952
  19. SouthEast Asia Advertising Market - Comprehensive Analysis by Country, Company, Platform & Revenue
    1,508
  20. Comprehensive Report on Portugal: Demographics, Digital Usage, and Top Streaming Companies
    842
  21. Mongolia Unpacked: Demographics, Digital Economy, and Leading Streaming Services
    1,381
  22. Italy: A Comprehensive Guide to Demographics, Digital Trends, and Its Top 10 Video Streaming Companies
    838
  23. Spain: Demographics, Digital Usage, Economic Insights & Top 10 Streaming Services
    1,246
  24. France's Digital Economy: Demographics, Trends, and Streaming Leaders
    764
  25. Germany's Digital Deep Dive: Demographics, Internet Usage, Market Trends, and Top 10 Video Streaming Powerhouses
    797
  26. United Kingdom: Demographics, Digital Life, and Streaming's Top 10 Players
    734
  27. Russia's Digital Blueprint: Economy, Demographics, and Streaming Landscape
    926
  28. Singapore's Top 10 Video Streaming Companies
    830
  29. Canada's Digital Pulse: Demographics, Connectivity & Top 10 Streaming Services Unveiled
    777
  30. Korea's Streaming Story: Top 10 Platforms in a Digital Nation
    1,739
  31. Malaysia's Top 10 Video Streaming Companies 2026
    1,259
  32. Indonesia's Top 10 Video Streaming Companies
    1,284
  33. Japan's Top 10 Video Streaming Companies
    853
  34. United States's Top 10 Video Streaming Companies
    751
  35. The Evolving Role of Engineering Organizations in the AI Era
    2,736
  36. Problem-Solving Narratives in Startup Programs
    688
  37. Vietnamese Top 10 Video Streaming Companies 2026
    1,694
  38. Thailand's Top 10 Video Streaming Companies 2026
    1,614
  39. Phillippine's Top 10 Video Streaming Companies 2026
    1,304
  40. Business Structure Comparison: Sole Proprietorship vs S-Corporation
    7381
  41. Affordable Payroll Solutions for Family-Based Businesses in the US
    731
  42. Vietnam Television (aka VTV)
    965
  43. Do we know what causes endometrial cancer?
    1,683
  44. What should you ask your physician about endometrial cancer?
    2,090
  45. How is cancer of the cervix treated?
    2,128
  46. Navigating Startup Funding Rounds: Expectations and Investment Sizes
    2,337
  47. What is hot water steam cleaning and aren't all steam cleaners the same?
    1,931
  48. To Pad or Not to Pad: The Lowdown on Carpet Padding
    2,025