web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Rename pdf files to fi...
Power Automate
Unanswered

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 538 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard