Skip to main content

Notifications

Community site session details

Community site session details

Session Id : UAGKZfNMeSMUcmvI0SoDDo
Power Automate - Building Flows
Suggested answer

Renaming Folders - Stuck - Out of Index-Error-But why?

Like (0) ShareShare
ReportReport
Posted on 16 Mar 2025 21:40:01 by
Hi,
 
can s.o. please tell me why this does not work?
 
1. I have a test-folder with 5 subfolders
2. I have an Excel with 5 names. The subfolders shall be named accordingly. Path is ok.
3. I have thia PAD:
...
3) It reads the new names and stores them into the var ExcelData.
4) It reads the names of te subfolders and stores them into the var Folders
    5) For each loop to get the subfolder from Folders
        6) For each loop to get the name-to-be from ExcelData
            7) Rename each subfolder
 
At 7 I get an Error
 
 
 
 
 
I'm stumped.
 
But...Why can't it rename the folder? The text looks good!
 
The error is = System.IndexOutOfRangeException: Index was outside the bounds of the array.
 
I can't see the forest for the trees. If someone could explain, pleasee? Probably I'll say "Of course! How could I not get this!" But that is the way.
  • Suggested answer
    Nived_Nambiar Profile Picture
    17,361 Super User 2025 Season 1 on 17 Mar 2025 at 02:44:04
    Renaming Folders - Stuck - Out of Index-Error-But why?
    Hi,
     
    I feel something wrong with logic in your flow. Can you explain how you need to rename the folder with names in excel file - is it like first folder name should be renamed with first name present in excel, same with second folder in excel like that ?
     
     

    Thanks & Regards,
    Nived N

    Stay connected:
    LinkedIn | YouTube | Blogs

    Was this answer helpful?
    If yes, please mark it as the solution by selecting the checkbox in the discussion thread.
    Your feedback motivates me to keep contributing. Thank you!

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

Thomas Rice – Community Spotlight

We are honored to recognize Thomas Rice as our March 2025 Community…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,513 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,474 Most Valuable Professional

Leaderboard
Loading complete