for server version >2.1, in my vb.net client i use following code to get a tree-view of folder structure of media folder.
If ServerVersion > 2.1 Then
Dim webClient As New System.Net.WebClient
Dim result As String = webClient.DownloadString("http://" & frmmediaplayer.cmbhost.Text & ":8000/cls")
Dim bb() = Split(result, vbNewLine)
ReDim aa(bb.Count)
For iclips = 0 To bb.Count - 1
Dim foldername As String = ""
Dim clipname As String = Replace(Replace(Split(bb(iclips), " ")(0), "\", "/"), """", "")
foldername = Mid(clipname, 1, Len(clipname) - Len(Split(clipname, "/").Last) - 1)
aa(iclips) = "Clips\" & Replace(foldername, "/", "\")
Next
End If
Already discussed here.https://casparcgforum.org/t/template-from-svt-caspar-dll/249/5?u=vimlesh1975