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 / Flow stopped working w...
Power Automate
Unanswered

Flow stopped working with error

(0) ShareShare
ReportReport
Posted on by 22

Hello,

I have a flow (retrieves email attachments and renames files) that has been working well for the past few months but all of a sudden it's giving me a "Folder doesn't exist" error as of today. I didn't make any changes to it recently so I don't know what happened.

Any assistance is greatly appreciated.

 

unnamed.png

unnamed.png

I have the same question (0)
  • CU16071609-1 Profile Picture
    6,255 Moderator on at

    @marksben32 

     

    Try the below approach:

     

    Simply specify the current directory name and the new name for your file when renaming it.

     

    Deenuji_2-1719339116036.png

     

    Deenuji_3-1719339210930.png

     

     

    Code:

    Folder.GetFiles Folder: $'''D:\\C Drive Backup\\Deenu\\Folder A_NewFolder''' FileFilter: $'''*''' IncludeSubfolders: False FailOnAccessDenied: True SortBy1: Folder.SortBy.NoSort SortDescending1: False SortBy2: Folder.SortBy.NoSort SortDescending2: False SortBy3: Folder.SortBy.NoSort SortDescending3: False Files=> Files
    LOOP FOREACH CurrentItem IN Files
     Text.SplitText.SplitWithDelimiter Text: CurrentItem.FullName CustomDelimiter: $'''\\''' IsRegEx: False Result=> TextList
     File.RenameFiles.Rename Files: CurrentItem.FullName NewName: $'''%CurrentItem.Directory%\\%TextList[2]%''' KeepExtension: True IfFileExists: File.IfExists.DoNothing RenamedFiles=> RenamedFiles
    END

     


    Thanks,
    Deenuji Loganathan 👩‍💻
    Automation Evangelist 🤖
    Follow me on LinkedIn 👥

    -------------------------------------------------------------------------------------------------------------
    If I've helped solve your query, kindly mark my response as the solution ✔ and give it a thumbs up!👍 Your feedback supports future seekers 🚀

  • marksben32 Profile Picture
    22 on at

    Thanks for the response. It's now giving me a "Can't rename file" error.

    unnamed.png

  • CU16071609-1 Profile Picture
    6,255 Moderator on at

    @marksben32 

     

    Please click on the error and copy and share the full error details.

     

    Also please share screenshot of TextList and Currentitem variable to understand the value which currently holds in..

     


    Thanks,
    Deenuji Loganathan 👩‍💻
    Automation Evangelist 🤖
    Follow me on LinkedIn 👥

    -------------------------------------------------------------------------------------------------------------
    If I've helped solve your query, kindly mark my response as the solution ✔ and give it a thumbs up!👍 Your feedback supports future seekers 🚀

  • marksben32 Profile Picture
    22 on at

    Correlation Id: 9c582911-46f1-4d54-968e-852222f116cf

     

    The given path's format is not supported.: Microsoft.PowerPlatform.PowerAutomate.Desktop.Actions.SDK.ActionException: Can't rename file ---> System.NotSupportedException: The given path's format is not supported.

       at System.Security.Permissions.FileIOPermission.EmulateFileIOPermissionChecks(String fullPath)

       at System.Security.Permissions.FileIOPermission.QuickDemand(FileIOPermissionAccess access, String fullPath, Boolean checkForDuplicates, Boolean needFullPath)

       at System.IO.File.InternalMove(String sourceFileName, String destFileName, Boolean checkHost)

       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)

    unnamed.png

    unnamed.png

    unnamed.png

  • CU16071609-1 Profile Picture
    6,255 Moderator on at

    Please make sure textlist[0] doesn’t contain any special characters.

     

    Meanwhile Please open the TextList variable on the below highlight panel after execution and share screenshot 

    Deenuji_0-1719342601592.jpeg


    Thanks,
    Deenuji Loganathan 👩‍💻
    Automation Evangelist 🤖
    Follow me on LinkedIn 👥

    -------------------------------------------------------------------------------------------------------------
    If I've helped solve your query, kindly mark my response as the solution ✔ and give it a thumbs up!👍 Your feedback supports future seekers 🚀

  • marksben32 Profile Picture
    22 on at

    I did not find any special characters in TextList[0].

    unnamed.png

  • VishnuReddy1997 Profile Picture
    2,666 Super User 2026 Season 1 on at

    Hi @marksben32 ,

     

    Instead of spliting you can try the solution as shown below.

    VishnuReddy1997_1-1719378830027.pngVishnuReddy1997_2-1719378861235.png

     

    (Note:- if you got your solution you can mark as solution and gives kudos)


    Thanks & Regards

    Vishnu Reddy

  • CU16071609-1 Profile Picture
    6,255 Moderator on at

    @marksben32 

     

    I think you are trying to rename the file with folder name as textlist[0] looks like folder path only.

     

    Configure your rename file action like below but mention TextList[1] instead of [0].

    Deenuji_0-1719379159559.png

     


    Thanks,
    Deenuji Loganathan 👩‍💻
    Automation Evangelist 🤖
    Follow me on LinkedIn 👥

    -------------------------------------------------------------------------------------------------------------
    If I've helped solve your query, kindly mark my response as the solution ✔ and give it a thumbs up!👍 Your feedback supports future seekers 🚀

     

  • marksben32 Profile Picture
    22 on at

    Thanks for the response. I need the split to remove part of the name after '-' so removing the splitting didn't work. 

  • marksben32 Profile Picture
    22 on at

    Changing TextList[0] to TextList[1] gave me an error of Index '1' is out of range.

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 274 Super User 2026 Season 1

#2
11manish Profile Picture

11manish 175

#3
Haque Profile Picture

Haque 166

Last 30 days Overall leaderboard