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 / Automatically Moving F...
Power Automate
Unanswered

Automatically Moving File from One Sharepoint Folder to Another Based on First Six Characters of File Name

(0) ShareShare
ReportReport
Posted on by

Hi,  

 

I'm attempting to create a power automate flow for work that moves a file from one sharepoint folder to another based on the first six characters of the file name.  Specifically, I want to design one that moves the file to a folder that shares the same first six characters (i.e., AE XXX).  If a folder does not exist, then have power automate create a folder with the file name's first six characters and move the file to that folder.  Can I do this? 

Categories:
I have the same question (0)
  • cwebb365 Profile Picture
    3,294 Most Valuable Professional on at

    Yeah, just utilize on modified or created and a Condition that uses starts with (filenamewithextention starts with "your six characters"), then on the yes side move file action. You won't have to do anything in terms of checking the folder and creating it, just put the destination folder with the 6 characters and it will either move it to that folder, or create the folder if it doesn't exist to move the file to built into the action. 

     

    For the destination folder, put the path in, then at the / for the folder put an expression that uses

    substring(triggerbody(filenamewithextension),0,6) < code isn't exact but use the dynamic content for filename there, that will return the first 6 characters of the file for the folder. 
     

    and call it a day. 

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 592

#2
Valantis Profile Picture

Valantis 340

#3
11manish Profile Picture

11manish 284

Last 30 days Overall leaderboard