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 / Copy the file in the l...
Power Automate
Answered

Copy the file in the last sub folder

(0) ShareShare
ReportReport
Posted on by 95

Hi. Newbie question

 

I want a flow that copies the file that is in the last sub folder (numerically ordered folders).

 

I have made a list. I count that to get the highest numerical folder number. I then use that variable to create the next folder. all good with this.

 

I am not sure how to copy the file that was in the previous highest numbered folder? how do i extract the file value from the list?

 

Any advice or learning pages greatly appreciated.

  • Verified answer
    fraenK Profile Picture
    2,125 on at

    https://docs.microsoft.com/en-us/power-automate/desktop-flows/variable-data-types#advanced-data-types

     

    %ListVariableName[ListVariableName.Count-1]% returns the last element of a list

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

Leaderboard > Power Automate

#1
11manish Profile Picture

11manish 298 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 289

#3
Henil Profile Picture

Henil 125

Last 30 days Overall leaderboard