I've queried the Catalog in the ReportServer database to get the list of folders that exist in the report server. So I have results that look like this:
[Path]
/Admin
/Compliance/Self Serve/Dublin
/Directors/Daily Reports
So there could be a single forward slash for a top level folder, two forward slashes for the top level folder and one level down and then 3 or more for even deeper folder levels.
I need to break this into two parts. The first column should just be the top level folder name without the starting forward slash and the second part should be the rest of the folder structure from the next level down, e.g.
[Folder] [Subfolders]
Admin
Compliance Self Serve/Dublin
Directors Daily Reports
There are lots of methods of getting strings before and after symbols that do part of what I need, but the issue of the top level folders is stumping me, where there is only one forward slash.
All suggestions desperately received.