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 / Move and replace folder
Power Automate
Unanswered

Move and replace folder

(0) ShareShare
ReportReport
Posted on by 36
Hello! 

So, if I have for example in my computer
1- the source path: Download/folder1/folder2/folder3
2- the destination path: Download/folderA/folderB
I want a condition as follow: if /folder3 already exists in destination path, then replace it with the /folder3 of the source path. Otherwise, just move Download/folder1/folder2/folder3 to Download/folderA/folderB

THANKS!

I have the same question (0)
  • UshaJyothiKasibhotla Profile Picture
    225 Moderator on at

    1. use if find folder exists activity 

    if folder exists then you need to delete existing and move the folder3 source path 

    take else

    use move folder activity

     

    Hope this helps 

    Usha

     

  • Agnius Bartninkas Profile Picture
    Most Valuable Professional on at

    Use Get subfolders in folder to get the folders in your source directory. Then do a For each loop on them to process each of them individually.

     

    When you have a %CurrentItem% that will store a single folder, you can use %CurrentItem.Name% to get the name of the current folder. You can use that in If folder exists to check if the destination directory contains a folder with a name like that.

     

    If it does, use Delete folder(s) to delete the folder from the destination directory. No need for any else statements, as you simply need to delete it if it does exist.

     

    Then after the condition, use Move folder to move it from the source to the target.

    -------------------------------------------------------------------------
    If I have answered your question, please mark it as the preferred solution. If you like my response, please give it a Thumbs Up.

    I also provide paid consultancy and development services using Power Automate. If you're interested, DM me and we can discuss it.

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 474

#2
11manish Profile Picture

11manish 268

#3
David_MA Profile Picture

David_MA 243 Super User 2026 Season 1

Last 30 days Overall leaderboard