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 / How to reference a cha...
Power Automate
Unanswered

How to reference a changing file in a constant folder? (file name is changing based on the date)

(0) ShareShare
ReportReport
Posted on by 2

I am trying to automate the receipt of a daily email with an excel attachment. I save the attachment into the same folder every day.

I need,

- first row of excel spreadsheet deleted

- saved into the folder

 

Currently, I can't figure out how to reference a file whose name is changing. I can complete a flow that runs successfully on the same file name, by deleting the row and saving it again. I am assuming I need to define a variable for the file path but haven't figured it out. 

 

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

    - One option is to keep a folder called "Latest Downloads" which will always have one file that has been just downloaded.

    After your work is done move it to your desired folder.

     

    - Another option is to download it directly to your desired folder and then if you do the get files with the sorted order on the date/time it will give you the name of the latest file.

  • kdu88an Profile Picture
    2 on at

    Ok.

     I just don't know how to reference a file in a folder, no matter what the file is. Ideally the flow deletes all other files other than the newest one in the folder, but im trying to automate the reciept of the spreadsheet through outlook daily, delete the first row, save it into the folder and delete other files that are in there (previous day). I have figured out how to do this for a file whose name stays the same but as soon as the next days file comes in it cant read it. Need some variable i can reference like file in x folder. Thanks

  • AS-06081019-0 Profile Picture
    1,738 Super User 2024 Season 1 on at

    @kdu88an Could you please share what you have achieved so far?

  • VJR Profile Picture
    7,635 on at

    Hi @kdu88an 

    If you are getting the file from Outlook then you can get the full file path and name details from the attachments section.

    Store this attachment name in a variable and then use that variable in the Launch Excel. 

     

    If this is still not what you are asking 🙂 then please let me know.

     

    VJR_0-1655267267538.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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Valantis Profile Picture

Valantis 474

#2
11manish Profile Picture

11manish 268

#3
David_MA Profile Picture

David_MA 243 Super User 2026 Season 1

Last 30 days Overall leaderboard