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 / Save file to a folder ...
Power Automate
Answered

Save file to a folder with increasing number after name

(1) ShareShare
ReportReport
Posted on by 35
Hi
 
My flow opens a new worksheet "Book 1" at the end I want to save this worksheet to a folder with a number after the name XYZ.
For example XYZ_1.xlsx. So when I look in the folder I will see various files ...
 
XYZ_1.xlsx
XYZ_2.xlsx
XYZ_3.xlsx
XYZ_4.xlsx
XYZ_.x5lsx
 
Next time I run the flow the file with be XYZ_6.xlsx
 
I have tried using Rename files with the sequential option with no luck.
 
Any advice I will be very grateful for.
Much appreciated,
Kasey
 
I have the same question (0)
  • Suggested answer
    Nived_Nambiar Profile Picture
    18,138 Super User 2026 Season 1 on at
    Hi,
     
    Not sure whether you are using desktop flow/cloud flow - if using desktop flow - then use this logic 
     
    First find the files present in the given folder where you need to save the file using below action 
     
    Here you see - I have use filter to find only files whose extension ends with xlsx, you can use additional filters based on file name start etc.
     
    When you save the file - use %Files3.Count+1% at the end of file name while saving - so it should be like 
    FileName (without extension)+%Files3.Count+1%+ file extension 
     
    Hope it helps !
     
    Mark it as solution if it solves your query !
     
    Thanks & Regards,
    Nived N
  • CU23111917-0 Profile Picture
    35 on at
    Thank you so much @Nived_Nambiar
    Exactly what I needed. I searched the web for the solution and watched lots of videos, finally gave this platform a go.
    Just start using Power Automate (desktop) and it's so useful.
     
    Can you tell me is the a site that can teach me stuff like your solution ... %Files3.Count+1%.
    I had a feeling I needed to use +1 but I could not find the solution.
     
    I love learning so if you know a good site I'd very much appreciate it.
     
    Thanks again for all your help!!
     
    Kasey
  • Suggested answer
    Nived_Nambiar Profile Picture
    18,138 Super User 2026 Season 1 on at
     
    You can refer these microsoft documentation 
     
     
     
    Well along with that- when you use these variables in Power Automate desktop - these option would appear as method within variables itself.
     
     
    Hope it helps !
    Thanks & Regards,
    Nived N

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 229 Super User 2026 Season 1

#2
11manish Profile Picture

11manish 227

#3
Haque Profile Picture

Haque 181

Last 30 days Overall leaderboard