We have a large SharePoint Online farm that is in dire need of cleanup. We've noticed that we have a lot of extraneous files that are particularly thorny to get access to programmatically. I do my scripting using PowerShell/CSOM and have no trouble accessing normal files, but these are a special case. The files in question are located in a folder that has a reserved name, KB905231, and should never have been allowed in the first place.
Some_Saved_Email_files <--invalid folder name and invisible to CSOM Some_Saved_Email_files\file1.xml <--valid file name but invisible because child of invalid folder Some_Saved_Email_files\file2.xml <--valid file name but invisible because child of invalid folder Some_Saved_Email_files\file3.thmx <--valid file name but invisible because child of invalid folder
As far as I can tell, these folders are completely inaccessible through CSOM (and likely any programmatic access). The only way to see them is to access the folder in Windows Explorer using WebDAV.
Does anyone have any novel ideas regarding programmatic deletion of this mess?