web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Renaming Photo Files w...
Power Automate
Unanswered

Renaming Photo Files with Date Taken

(1) ShareShare
ReportReport
Posted on by Microsoft Employee

Hey all,

 

I'm running into an issue with Power Automate Desktop and renaming photo files. The process of bulk renaming is straight forward enough based on folder location. However, the "creation date" of the files/photos, which is what Power Automate uses when adding date/time is not the date I need to use. I need to use "Date Taken". Is there a way to pull this data into the name instead of the Date Created?

 

I'm currently thinking the only way to get this done is to use script to pull the exif data into an excel file and then rename all the files using the excel. Any thoughts/help would be much appreciated.

 

 

Thanks!

I have the same question (0)
  • ryule Profile Picture
    929 Super User 2024 Season 1 on at

    Aside from what you mentioned, the only way I think you could do that is to add timestamp actions before each screenshot, and append that to the name....but depending on how many you are doing, that could be quite a task.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Thanks! We have trail cameras set up for longterm monitoring of locations and are downloading thousands of photos a month, so I'm thinking excel is my best bet. Or just biting the bullet and not renaming them.

  • ryule Profile Picture
    929 Super User 2024 Season 1 on at

    Oh, sorry, I thought you were talking about screenshots taken by PAD!

  • momlo Profile Picture
    1,527 Super User 2024 Season 1 on at

    @Anonymous 

    You can pull the metadata using VB (visual basic). I remember an excellent post on this forum with an example code. Unfortunately, I can't recall who posted that, so try to search the forum.

     

    edit - this post by @VJR 

    https://powerusers.microsoft.com/t5/Power-Automate-Desktop/Rename-Mp3-Files-in-a-Folder-using-the-Title-in-the-metadata/m-p/1558628/highlight/true#M13748

     

     


    Here is something similar on another forum:

     

    https://social.msdn.microsoft.com/Forums/en-US/512d384b-9377-4dff-8061-3276fddb8c91/retrieving-file-metadata-using-vbnet?forum=vbgeneral

     

  • Nived_Nambiar Profile Picture
    18,138 Super User 2026 Season 1 on at

    Hi @Anonymous 

     

    try this vbs script  using VBS script action. Here %photo_file% represent the file path of the file you need to get date taken defined in power automate desktop

     

     Option Explicit

    Dim photoPath, folder, filename, shell, folderItems, photoFile, dateTaken,filenameExt

    ' Replace with the path to your photo file
    photoPath = "%photo_file%"

    ' Get the folder object that contains the photo file
    folder = Left(photoPath, InStrRev(photoPath, "\") - 1)
    ' Get the photo file name
    filename = Mid(photoPath, InStrRev(photoPath, "\") + 1)
    ' Load the shell.application COM object
    Set shell = CreateObject("Shell.Application")
    ' Get the folder items for the folder object
    Set folderItems = shell.Namespace(folder).Items()

    ' Find the photo file in the folder items
    For Each photoFile In folderItems
      filenameExt= Mid(photoFile.Path, InStrRev(photoFile.Path, "\") + 1)
      If filenameExt = filename Then
        ' Get the photo's date taken property
        dateTaken = photoFile.ExtendedProperty("{14B81DA1-0135-4D31-96D9-6CBFC9671A99} 36867")
        Exit For
      End If
    Next

    ' Output the date taken
    WScript.Echo dateTaken

     

    Mark it as solution if it helps !

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 464

#2
Haque Profile Picture

Haque 416

#3
David_MA Profile Picture

David_MA 323 Super User 2026 Season 1

Last 30 days Overall leaderboard