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 / Rename pdf files to fi...
Power Automate
Answered

Rename pdf files to first 15 characters of the original name

(0) ShareShare
ReportReport
Posted on by 3

Hi!

I'm pretty new to Power Automate Desktop and am trying to rename all the pdf files in a folder to the first 15 characters of their current name. 

I tried -

Get files in folder that match '*' and store them into Files

Get subtext of Files starting at character 0 with length 27 and store it into Subtext (the 27 includes the folder path)

Rename file(s) Files to Subtext and store them into List RenamedFiles

 

The Files variable correctly contains all the files from the folder, but my problem is that the Subtext only gets the first file.  How can I rename all the files in the folder to the first 15 characters of their name + file extension?  Am I on the right track?

 

Thanks so much!

 

Liz

 

 

I have the same question (0)
  • Verified answer
    VJR Profile Picture
    7,635 on at

    - Use the Get file path part action to get only the file name. Save this in a variable lets say OriginalName

    - And then do a Subtext

    VJR_0-1664511365423.png

    The Subtext variable will now have the 15 chars of the string. You need to take care of validation in case the original name is not more than 15 chars.

    - Then do the rename using the original name and the new name.

    - Since this will be inside the loop it should do this for all the files.

     

    Post back if you are facing any issues.

     

     

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!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 589

#2
Valantis Profile Picture

Valantis 328

#3
David_MA Profile Picture

David_MA 284 Super User 2026 Season 1

Last 30 days Overall leaderboard