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 / Change Folder Path in ...
Power Automate
Unanswered

Change Folder Path in Create File

(0) ShareShare
ReportReport
Posted on by 12

Hi

I am creating an approval flow that creates a PDF file on approval.

The library that I have the flow running in has multiple folders. All files to be approved are in one of many preaprroved folders.  libraryX/.../.../.../preapproved 

Convert word to PDF is used, then create file but I do not want to specify the folder here as there are multiple options.

eg

libraryX/UK/London/east/preapproved must go to libraryX/UK/London/east/approved

libraryX/UK/London/west/preapproved must go to libraryX/UK/London/west/approved

 

SamGreen_0-1643602461018.png

 

I guess I am looking for an expression that will check the previous files folder but am new to Power Automate so would be grateful if someone could give me some guidance please.

 

I also want to copy all the SharePoint properties of the original file to the new file and it's folder.

 

thanks in advance.

 

Categories:
I have the same question (0)
  • v-xiaochen-msft Profile Picture
    on at

    Hi @SamGreen ,

     

    You could use replace() function to update the folder path.

    replace('libraryX/UK/London/east/preapproved','preapproved','approved')

     

    vxiaochenmsft_0-1643853143527.png

     

    Best Regards,

    Wearsky

  • SamGreen Profile Picture
    12 on at

    Thank you for your reply. The create file is within a yes condition so I couldn't add the variable above it. I tried adding it before an approval request before the condition but get an error of Root folder is not found. In the value I only entered /preapproved because the previous folders will vary.

  • EDI_Manager Profile Picture
    27 on at

    I have this condition in "When a new email arrives in a shared mailbox (V2)->Subject Filter"

    @or(contains(triggerBody()?['Subject'],'EDI Auto Save: S/R error rpt (to: \zSendReceive Rpt'),
    contains(triggerBody()?['Subject'],'EDI_Rpt UnAckd txns rpt')

    EDIGuy_0-1663611240745.png

    EDIGuy_1-1663611267498.png

     

    In the same flow I want to save each of those files to a different network directory based on the subject.

    Can I use a similar condition in "Apply to each->Create file->Folder path" to create a different path for each?

     

    Here's the whole thing so far...

    EDIGuy_0-1663611737673.png

    EDIGuy_1-1663611843489.png

    I need to change the directory path based on the same subject condition I added in the "Subject Filter" above.

     

    I'd appreciate any help!

    @EDIGuy 

     

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 538 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard