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 / Renaming file where so...
Power Automate
Unanswered

Renaming file where source file name varies

(0) ShareShare
ReportReport
Posted on by 2

I am trying to build a flow to rename a source file, xlsx format.

But the filename of the source file varies each time it is created by a third party.

 

It is the only xlsx file in that OneDrive folder.

PA seems to require me to choose a particular file but the filename differs each day.

 

What do I need to add to my flow to pick up that xlsx file, irrespective of whatever it is called on that day, and rename it to the non-changing filename?  

 

Thanks!

Categories:
I have the same question (0)
  • ChristianAbata Profile Picture
    8,951 Most Valuable Professional on at

    hi @smacsween  what you can do is use expressions.

     

    Imagine that you have this name in a propertie call FileName: myfilexample.xlsx

     

    so you can add a compose action and inside an expression to get the filename of the file extension

    Filename:

    first(split('FILENAMEPROPERTIE','.'))

    Fileextension:

    last(split('FILENAMEPROPERTIE','.'))

     

    If you want to see who you can add expression you can see my video here https://www.youtube.com/watch?v=MHvWuFMXhes

     

    I hope this can helps

     

  • smacsween Profile Picture
    2 on at

    Thanks Christian.  Your solution is good but it only works where I know the filename already.

     

    I want the flow to search for the xlsx file - note it will be the only one of that filetype in the folder, then depending on that filename, change the filename to a new, standard filename.

     

    For example the filenames may be 

    1024535.xlsx

    57232234.xlsx

    and each time I run the flow, i want it to select the relevant filename and change it to "profiles.xlsx"

     

    Any ideas? 🙂

  • ChristianAbata Profile Picture
    8,951 Most Valuable Professional on at

    @smacsween  ohh to find files you can use this actions to one drive or sharepoint

     

    list.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

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 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard