Hi @Billapati, Naveen ,
Thanks for using Microsoft Q&A !!
You can extract the folder names using Lookup and Filter activity (to filter only Folders) and then you can get the last folder item from retrieved folder list with code like below -
@activity('Filter Folders').output.Value[sub(int(activity('Filter Folders').output.FilteredItemsCount),1)].Name
Here FilteredItemsCount is available through Filter activity (See screenshots below) and you could get the last item using index.
Please find below the GIF which could help you understand it better.
Hope this would work in your scenario. Please let me know if any questions.
Thanks
Saurabh
----------
Please do not forget to "Accept the answer" wherever the information provided helps you to help others in the community.