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 Apps / Get file content from ...
Power Apps
Answered

Get file content from dynamic file name

(0) ShareShare
ReportReport
Posted on by 5

Hi everyone.

 

I am new to power automate and i am struggling with creating a specific flow. 

 

I have a power bi report that looks at monthly performance data. The report is using a number of files currently on a onedrive folder. Each month a new set of files are created. I need to move these files to another onedrive folder. However, the files names are made up by a main part of the name followed by a PXX (where XX represent the month number). For the BI report to work, i need to move the files to another onedrive folder and removing the PXX part of the name. I have been doing this manually, but would like to move to a power automate flow that is triggered manually by me. 

 

I have successfully done this other files where the name was not dynamic by using the below flow. This flow for obvious reasons does not work when the file name is dynamic. Can anyone help me with a flow that would do the same but taking into account that the file names are dynamic. The onedrive folders are static. 

 

Aemco_0-1678107330291.png

 

Categories:
I have the same question (0)
  • Verified answer
    v-chengfen-msft Profile Picture
    Microsoft Employee on at

    Hi  @Aemco ,

    I made a template for your reference:

    List files in folder: List the files in the folder
    Filter array: Filter out the files whose file name contains P+ current month

    vchengfenmsft_0-1678156498666.png

    Get the file, then create the file to another folder.
    Use the formula to replace the P+ month in the file name with a blank to delete the P+ month

    vchengfenmsft_1-1678156649112.png

     

    Best Regards

    Cheng Feng

     

     

  • Aemco Profile Picture
    5 on at

    Thank you Cheng Feng.

     

    Your flow works perfectly. Greatly appreciate it 

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 July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 396 Most Valuable Professional

#2
11manish Profile Picture

11manish 134 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 101 Super User 2026 Season 2

Last 30 days Overall leaderboard