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

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / How to Handle Differen...
Power Automate
Unanswered

How to Handle Different File Extensions in a Loop When Renaming Files?

(0) ShareShare
ReportReport
Posted on by 26

I encountered an issue by renaming files within a loop, I inadvertently removed their extensions. This became problematic as the loop iterates through various file types such as PDFs or Excel files. Could someone please advise on how to extract the file extension during the loop for each specific file, and then ensure it’s added back to the filename when renaming? I tried adding a split function within the renaming of the file name, but it came with an error. Any help or guidance would be appreciated. Thank you!

 

jgoldstein3_0-1710945074501.pngjgoldstein3_1-1710945083561.png

 

 

Categories:
I have the same question (0)
  • Verified answer
    creativeopinion Profile Picture
    10,502 Super User 2025 Season 2 on at
    Re: How to Handle Different File Extensions in a Loop When Renaming Files?

    @jgoldstein3  You can refer to this section of my latest YT Tutorial where I show you how to create a dynamic file name. At this point I show you how to extract the file extension. You can apply this concept to your flow. 

    Hope this helps!

    If I helped you solve your problem—please mark my post as a solution ✅.
    Consider giving me a 👍 if you liked my response!

    👉 Level up your Power Automate skills by checking out my tutorials on YouTube
    👉 Tips and Tricks on TikTok and Instagram

     

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 462 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 456 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard