web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 501 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 323 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard