Move file with dynamic name to the sharepoint, logic app/ Move all the files from a folder but not the folder logic app

Mohammed Alfeed Peeranwale 1 Reputation point
2022-12-22T04:33:40.223+00:00

I have to move the files stored on SharePoint to the Archive folder on the same SharePoint once the file is processed. The Move file action is working fine when I pass the file path and the file name(static name), but I don't want to give any static name I need the logic app to move the files with their original names to the Archive folder.

See the below image it is working fine for this particular file

273056-image.png

I tried just giving the file path but not the file name, so the Move File action moved the last folder itself to the Archive folder, but I just want to move the files (xlsx, csv) to the Archive folder

Can anybody help me out with this, Thanks!

Azure Logic Apps
Azure Logic Apps
An Azure service that automates the access and use of data across clouds without writing code.
3,496 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. MayankBargali-MSFT 70,921 Reputation points Moderator
    2022-12-23T07:55:55.623+00:00

    @Mohammed Alfeed Peeranwale Thanks for reaching out. With Move file action you can move one file to the destination folder.
    As you want to move all the files from one folder to the other folder then you need to first call the Get Files action and iterate through the loop to move one file at a time to your destination folder.

    **Workflow: **

    Trigger --> Get Files --> Loop in through the files --> Move file and pass Full Path property in the File to Move property.

    273644-image.png

    Feel free to get back to me if you need any assistance.

    Please 'Accept as answer' and ‘Upvote’ if it helped so that it can help others in the community looking for help on similar topics.

    1 person found this answer helpful.
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.