VBA to rename picture files based on date taken

roc_on_the_rocks

Board Regular
Joined
Jun 6, 2009
Messages
173
Office Version
  1. 365
Platform
  1. Windows
Hello guys,
I'm taking the Christmas break to organize my 'digital life' and the biggest chunk of it are photos (and videos) files, ten thousands of them, in hundreds of folders.

The problem is that most of these photo files are named like 'IMG_xxxx.jpg'.

I'm looking for a macro that would scan the files in a given folder and would:
1) Rename the photo files with a naming format like this: YYYYMMDD_HHMMSS, based on 'Date Taken' from the EXIF metadata. Skip file if 'Date Taken' is unavailable (like in video files).
2) Create and save an Excel file (it can be csv) in that given folder, with columns listing the original file names and new names.

Of course #1 is more important, #2 is a 'nice to have'.

Do anyone have something like this?

Thanks a million guys! Great to be back here.
 

rollis13

Active Member
Joined
Jul 30, 2012
Messages
357
Office Version
  1. 2016
Platform
  1. Windows
Managed to replicate the problem; if you Copy/Paste the code of the class module GPSExifReader instead of Importing the originale file created by Wayne Phillips there will be some differences. I think that in the code there are 'special' characters that the CMS or Http doesn't detect.
 

Some videos you may like

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.

Watch MrExcel Video

Forum statistics

Threads
1,122,472
Messages
5,596,353
Members
414,060
Latest member
hermanseck

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top