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

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

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

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard