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 create folders ...
Power Automate
Unanswered

how to create folders with foldernames = filenames ?

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

I am trying to create folders with foldernames = filenames. I can get the list of files, but unable to create folders as I required Please help

I have the same question (0)
  • MichaelAnnis Profile Picture
    5,727 Moderator on at

    So, a list of %Files% is an entire file path, but they have several properties allowing you to extract specific information.  You can view these properties by running the "Get files in folder" action and right clicking on the "Files" variable in the variables window and going to View.  

    MichaelAnnis_2-1630334955301.png

     

    Then click on "More", any Item will do.

    MichaelAnnis_3-1630335022339.png

     

    I found the property called ".NameWithoutExtension".

    MichaelAnnis_4-1630335062354.png

     

    You can use this to create a folder with the filename no extension.  So, something like "C:\Documents\Excel1.xlsx" just becomes "Excel1".  Now, we will take this and loop it through every single file in "Files" and you can create your folders with the name without extension.

    MichaelAnnis_0-1630334822684.png

    The syntax for that inside of the create folder command is this:

    MichaelAnnis_5-1630335104402.png

     

     

    Best of Luck!

     



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 484

#2
11manish Profile Picture

11manish 282

#3
David_MA Profile Picture

David_MA 280 Super User 2026 Season 1

Last 30 days Overall leaderboard