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 / Renaming multiple outl...
Power Automate
Answered

Renaming multiple outlook attachments based on their names

(0) ShareShare
ReportReport
Posted on by 12

Hello everyone!

I am trying to do the following:

1- Pull multiple outlook attachments with the following name format: MGI - Daily Progress Report 29-03-2023

2- Rename the downloaded attachments to: DPS - 29-March-2023

 

I have created the following flow:

adaghma_0-1680422040588.png

The flow always fails in rename action whether I add it to the loop or without a loop.

 

This is the first flow I created and I really need your help!

Thank you

 

 
Screenshot 2023-04-02 105700.png
  • Nived_Nambiar Profile Picture
    18,138 Super User 2026 Season 1 on at

    Hi @adaghma 

     

    May i know what is the error message you are getting at rename action ?

  • adaghma Profile Picture
    12 on at

    Hi @Nived_Nambiar This is the error message:

    adaghma_0-1680459967612.png

    Spoiler (Highlight to read)
    Microsoft.Flow.RPA.Desktop.Modules.SDK.ActionException: Can't rename file ---> System.ArgumentException: Illegal characters in path.
    at System.IO.Path.CheckInvalidPathChars(String path, Boolean checkAdditional)
    at System.IO.Path.Combine(String path1, String path2)
    at Microsoft.Flow.RPA.Desktop.Modules.File.Actions.RenameFilesAction.Execute(ActionContext context)
    --- End of inner exception stack trace ---
    at Microsoft.Flow.RPA.Desktop.Modules.File.Actions.RenameFilesAction.Execute(ActionContext context)
    at Microsoft.Flow.RPA.Desktop.Robin.Engine.Execution.ActionRunner.Run(IActionStatement statement, Dictionary`2 inputArguments, Dictionary`2 outputArguments)
    Microsoft.Flow.RPA.Desktop.Modules.SDK.ActionException: Can't rename file ---> System.ArgumentException: Illegal characters in path.at System.IO.Path.CheckInvalidPathChars(String path, Boolean checkAdditional)at System.IO.Path.Combine(String path1, String path2)at Microsoft.Flow.RPA.Desktop.Modules.File.Actions.RenameFilesAction.Execute(ActionContext context)--- End of inner exception stack trace ---at Microsoft.Flow.RPA.Desktop.Modules.File.Actions.RenameFilesAction.Execute(ActionContext context)at Microsoft.Flow.RPA.Desktop.Robin.Engine.Execution.ActionRunner.Run(IActionStatement statement, Dictionary`2 inputArguments, Dictionary`2 outputArguments)

    and this is how I made the loop for rename, I don't know if its correct or not?:

    adaghma_1-1680460057335.png

    Thank you!

     

     
  • Verified answer
    Nived_Nambiar Profile Picture
    18,138 Super User 2026 Season 1 on at

    Hi @adaghma 

     

    Try this way 

    Nived_Nambiar_0-1680491457960.png

     

    It is because replace with expects text not list 🙂

    Hope it helps 

     

  • adaghma Profile Picture
    12 on at

    @Nived_Nambiar It worked perfectly Nived!

    I never saw any tutorial that did it the way you did

    Thank you again Nived, i would be very grateful if you explained how you solved it

     
  • Nived_Nambiar Profile Picture
    18,138 Super User 2026 Season 1 on at

    Hi @adaghma 

     

    Did you meant how actually i approached the problem /question?

  • adaghma Profile Picture
    12 on at
  • Nived_Nambiar Profile Picture
    18,138 Super User 2026 Season 1 on at

    Hi @adaghma 

     

    I did experiments to get the correct answers That's my way of solving question 😅😅😅

     

    Actually for rename, i usually use one file for renaming but here you have used multiple files at once, i did not did this earlier, just got some idea from Microsoft documentation  and gave a try , that's all

     

    And thank you for making me learning something new !

     

    Hope you have a nice day !

     

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

Leaderboard > Power Automate

#1
11manish Profile Picture

11manish 249 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 202

#3
David_MA Profile Picture

David_MA 180 Super User 2026 Season 2

Last 30 days Overall leaderboard