When attempting to move files in SharePoint Online Office365 from one folder to another you may find that you get errors or the moving process times out or fails with the error:
Error: We couldn't move the file because it's locked for editing or has been modified or deleted.
What has happened is some of the files in these folders have been marked as “checked out” or “locked”. This may have been done erroneously by a user or the status was corrupted when the files were originally uploaded into SharePoint.
Once the files are checked in, you can move them. As an alternative to moving the files, you may also be able to “Copy To…”, and then delete the original files. Again, you may not be able to delete the files you copied because the files you want to delete in SharePoint may also be locked or checked-out.
This is what worked for me:
- Use your favorite web browser and log into your SharePoint site (e.g. https://companyname.sharepoint.com/sites/sitename.
- Browse to the problem folders that contain files that you cannot move to another folder.
- In the folders, you should find files that are “checked out”. The files will have a green arrow icon next to the file icon.
- Place a checkmark next to the file that is checked out.
- In the menu at the top-right choose “…”
- In the “…” menu, click “Discard check out”
- Now try moving the file with the following sequence:
- If the problem files are Word/Excel files, you may need to Open the files in Word or Excel first, in order to check them back in.