cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Wolfgang_S
Frequent Visitor

Move files and folders in SharePoint based on a link

Hi,

 

I have a SharePoint list that contains links to files and folders. Now I would like to move these files and folders in an automated  flow to another folder in SharePoint. Unfortunately the actions move file and and move folder do not accept links to identify the file or folder to be moved.

 

Wolfgang_S_0-1661332745863.png

Is there a way to do this?

 

Thanks for your help

Wolfgang

1 ACCEPTED SOLUTION

Accepted Solutions

Hello okeks,

 

thank you for your hint. 

 

But I have found an easier way. In my special case, the pathname and filename are part of the link. So I decided to extract pathname and filename from the link and use these. Therfore I use the function split:

 

split(split(triggerBody()?['DocumentLink'], '?') [0], 'ProjektarbeitI') [1]

 

Wolfgang_S_1-1661784577050.png

Wolfgang

 

View solution in original post

2 REPLIES 2
okeks
Super User
Super User

You will have to use the Sharepoint API with the Send HTTP request to Sharepoint action.

 

Here is a link to the documentation of the API: Working with folders and files with REST | Microsoft Docs

and here is some documentation on how to use it inside Power Automate: Working with the SharePoint Send HTTP Request flow action in Power Automate | Microsoft Docs

Hello okeks,

 

thank you for your hint. 

 

But I have found an easier way. In my special case, the pathname and filename are part of the link. So I decided to extract pathname and filename from the link and use these. Therfore I use the function split:

 

split(split(triggerBody()?['DocumentLink'], '?') [0], 'ProjektarbeitI') [1]

 

Wolfgang_S_1-1661784577050.png

Wolfgang

 

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Users online (3,541)