Moving a File to a Folder

To move a file to a different folder in SharePoint, use the following syntax:

get the file at "<file-url>"
get the folder at "<folder-url>"
move the file to the folder

Example:

get the file at "https://company.sharepoint.com/sites/ProjectX/Documents/file.docx"
get the folder at "https://company.sharepoint.com/sites/ProjectX/Archives"
move the file to the folder

Last updated

Was this helpful?