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

CK CK 3434 
Created at
Updated at  
818 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,058
  2. FNC Batch Renames Digital Photos by Date
    1,934
  1. Navigating App Store Guideline 4.3(a): Key Pitfalls to Avoid and How It Differs from 4.3(b)
    80
  2. Apple App Store Review Guideline Update: Section 4.3(b) Spam Provision
    96
  3. Meta Unveils Muse Charm: The Keychain AI Assistant That Could Replace Your Smartwatch
    1,486
  4. Why iCloud Passwords is useful?
    1,138
  5. The Correlation between Income Level and Television Viewing Time
    2,332
  6. Asus Chromebook (CB3-451) Factory Reset
    3,795
  7. Why Maintenance is never ending in the Interenet-based Service?
    4,526
  8. The AI Revolution of 2024: Gemini vs. ChatGPT-4o
    2,063
  9. The quality of DVD-Video
    1,878
  10. DVD stands for...
    1,834
  11. What is DVD?
    1,986
Recently updated
  1. US Tax Strategies for Digital Service Operators & AdSense Earners
    469
  2. Guide to Updating Company Legal Name on D-U-N-S Profile (AAA to BBB)
    466
  3. Health Insurance Options and Monthly Costs for a Family of Four in the US (Without Employer Coverage)
    1,170
  4. Essential US Business Setup: Automated Payroll, Benefits, Tax Services, and Monthly Costs
    236
  5. YouTube Language Usage in India: Comprehensive Statistics and Data Breakdown
    1,231
  6. India's Linguistic Landscape: Top Languages, Regional Distribution, and English Usage
    1,236
  7. Decoding Global TikTok Revenue: Monetization Trends, Market Tiers, and Social Commerce Growth
    1,456
  8. Countries Where Fortune-Telling and Amulets Are Strictly Illegal
    241
  9. Global YouTube Usage Analysis: Top 100 Countries by User Population
    1,089
  10. Good Company to Work For, but Pretty Pathetic once you Look Inside
    2,322
  11. Discovering OpenBugBounty: A Free Tool for Website Security Insights
    2,542
  12. Pre-Departure Google Workspace Personal Data Cleanup
    3,770
  13. The Harmful Effects of Squeezing Blemishes: Why You Should Avoid It
    2,009
  14. Finding Your Path to Clear Skin: The Best Way to Treat Acne
    2,226
  15. Choosing the Right Cosmetics and Cleansers for Acne-Prone Skin
    2,359
  16. Why Does Vietnamese Cable TV Have Almost No Ads? A Look at the Rules
    3,746
  17. In 2026, Advertising Is Converging on the TV Screen - 5 Opportunities OTT Operators Should Be Watching
    4,893
  18. Musk's Masterclass: Prioritizing, Delegating & Verifying
    891
  19. Life is Short: HubSpot Founder's Cliff-Edge Wisdom for Leaders
    3,944
  20. The Making of OpenAI: Birth, Battles, and Breakthroughs
    990
  21. Brazil's Digital & Demographic Deep Dive: Economy & Top Streaming Services
    1,612
  22. World Population Top 30 (2016-2025)
    1,226
  23. SouthEast Asia Advertising Market - Comprehensive Analysis by Country, Company, Platform & Revenue
    2,079
  24. Comprehensive Report on Portugal: Demographics, Digital Usage, and Top Streaming Companies
    1,040
  25. Mongolia Unpacked: Demographics, Digital Economy, and Leading Streaming Services
    1,815
  26. Italy: A Comprehensive Guide to Demographics, Digital Trends, and Its Top 10 Video Streaming Companies
    1,028
  27. Spain: Demographics, Digital Usage, Economic Insights & Top 10 Streaming Services
    1,484
  28. France's Digital Economy: Demographics, Trends, and Streaming Leaders
    1,059
  29. Germany's Digital Deep Dive: Demographics, Internet Usage, Market Trends, and Top 10 Video Streaming Powerhouses
    1,068
  30. United Kingdom: Demographics, Digital Life, and Streaming's Top 10 Players
    949
  31. Russia's Digital Blueprint: Economy, Demographics, and Streaming Landscape
    1,224
  32. Singapore's Top 10 Video Streaming Companies
    1,126
  33. Canada's Digital Pulse: Demographics, Connectivity & Top 10 Streaming Services Unveiled
    1,044
  34. Korea's Streaming Story: Top 10 Platforms in a Digital Nation
    2,153
  35. Malaysia's Top 10 Video Streaming Companies 2026
    1,606
  36. Indonesia's Top 10 Video Streaming Companies
    1,666
  37. Japan's Top 10 Video Streaming Companies
    1,142
  38. United States's Top 10 Video Streaming Companies
    1,075
  39. The Evolving Role of Engineering Organizations in the AI Era
    3,548
  40. Problem-Solving Narratives in Startup Programs
    846
  41. Vietnamese Top 10 Video Streaming Companies 2026
    2,141
  42. Thailand's Top 10 Video Streaming Companies 2026
    2,020
  43. Phillippine's Top 10 Video Streaming Companies 2026
    1,641
  44. Business Structure Comparison: Sole Proprietorship vs S-Corporation
    8821
  45. Affordable Payroll Solutions for Family-Based Businesses in the US
    874
  46. Vietnam Television (aka VTV)
    1,317
  47. Do we know what causes endometrial cancer?
    1,795
  48. What should you ask your physician about endometrial cancer?
    2,261