Forum Discussion
Can't delete empty folder
- Jun 04, 2022
MichaelDano I believe you may have an hidden file inside the folder.
Could you check it via PowerShell ?
Here you have already a PowerShell script as sample: https://www.sharepointdiary.com/2018/08/sharepoint-online-powershell-to-get-all-files-in-document-library.html
If you have owner rights try to check in the Library settings for "Manage files which have no checked in version"
As owner you can see if a user left a file without checked in version.
This may be the reason why you are not able to delete the folder
- mr_w1nst0nJun 04, 2022Iron Contributor
MichaelDano I believe you may have an hidden file inside the folder.
Could you check it via PowerShell ?
Here you have already a PowerShell script as sample: https://www.sharepointdiary.com/2018/08/sharepoint-online-powershell-to-get-all-files-in-document-library.html
- MichaelDanoJun 09, 2022Brass Contributormr_w1nst0n - Thanks - you were right.
How do I unhide the files?
Why does this happen in the first place?- mr_w1nst0nJun 10, 2022Iron Contributor
MichaelDano there may be multiple reasons for that. Sometimes it depends from the application/OS system you are using.
In my case it was Autocad generating hidden files in the folder (synchronized to SP).
Adobe Photoshop/Lightroom also generate hidden files sometimes
If they are not needed, you can delete the files directly via PowerShell