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 / Change file Name Error
Power Automate
Unanswered

Change file Name Error

(0) ShareShare
ReportReport
Posted on by 6

Hello,

 

I'm fairly new to Power Automate Desktop and I am trying to change the file name of some files in my downloads folder. I am simply trying to change the file name to the newname %Usedate%. The value in this case for %Usedate% = 11072022. Can someone help and let me know why I get this error. If you need any more information, just let me know. Thanks 

PADerror.PNG
I have the same question (0)
  • momlo Profile Picture
    1,527 Super User 2024 Season 1 on at

    Hard to say without seeing full error details

    First thing to check:

     

    You are changing files by reference their position on the list - are you sure your list has that many files?

    [0] is first file on the lis, [6] is seventh etc.

     

    If you have a list of files, and you want to rename each, use "for each" loop.

    Example, copy and paste into your flow:

     

    Folder.GetFiles Folder: $'''C:\\Users\\yourusername\\Desktop''' 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
     File.RenameFiles.Rename Files: CurrentItem NewName: $'''newname''' KeepExtension: True IfFileExists: File.IfExists.DoNothing RenamedFiles=> RenamedFiles
    END

     

  • VJR Profile Picture
    7,635 on at

    #i. Before renaming print the value of the yellow highlighted in a display box and see what it gets.

        See if it showing the value that you want it to have.

    VJR_0-1670556202794.png

     

    #ii. Make sure it does not have any invisible characters like newline, carriage return, line feed, tab etc.

    They can be gotten rid of by using the Trim text function before the renaming

     

    #iii. Make sure it does not contain any of the characters that are not acceptable in a file name

            VJR_1-1670556360683.png

     

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 600

#2
Valantis Profile Picture

Valantis 453

#3
11manish Profile Picture

11manish 356

Last 30 days Overall leaderboard