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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Help with Adding Incre...
Power Automate
Unanswered

Help with Adding Incremental Number to Duplicate File Names in Renaming Flow

(1) ShareShare
ReportReport
Posted on by 2

Hi everyone,

I've created a flow that renames some files. My goal is to rename the file unless a file with the same name already exists. If a duplicate exists, I want to append a number to the end of the file name and keep increasing the number by 1 until a unique file name is found.

I’ve successfully implemented the renaming part, but I’m struggling with adding the logic to handle duplicates by adding a number.

This is what I’ve come up with so far. I've tried a few different approaches, and this is the closest I've gotten.

 
 

The number will always be less than 3 in practice, but I've set it to go up to 10 just to be safe.

Where am I going wrong? I am probably missing something silly!

Thanks,
Ashley

Categories:
I have the same question (0)

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 525 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 324 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard