Come da titolo (e tenete presente che sono poco più di un neofita

):
ho uno script ASP che permette di visualizzare tutte le directory, subdirectory e file partendo da una cartella a piacere. Lo script in questione visualizza i risultati di questa esplorazione sotto forma di una tabella generata dinamicamente in cui ogni casella rappresenta un link ad un oggetto.
Mi trovo nella necessità di trasformare l'output di questo script in una serie di variabili da passare ad un'applicazione flash che provvederà a generare dinamicamente una serie di pulsanti di navigazione (uno per ogni cartella NON VUOTA e uno per ogni file), conservando la struttura in cartelle e sottocartelle originaria.
Il codice ASP è questo:
<%
Const strRootPath = "ROOT"
Dim strThisPage ' This page's relative URL
Dim strPath ' Path of directory to show
Dim strFullPath ' strRootPath & strPath
Dim objFSO ' FileSystemObject
Dim objFolder ' Folder
Dim objItem ' Looping variable
' Set the URL of this script to a variable so we don't
' have to keep looking it up.
strThisPage = Request.ServerVariables("URL")
' Read the subfolder to show from the querystring.
strPath = Request.QueryString("path")
' Check to make sure no one is trying to escape our root path.
If InStr(1, strPath, ".", 1) <> 0 Then strPath = ""
If InStr(1, strPath, Server.URLEncode("."), 1) <> 0 Then strPath = ""
strFullPath = strRootPath & strPath
' Create our FSO and get a handle on our folder
Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
Set objFolder = objFSO.GetFolder(Server.MapPath(strFullPath))
' Show a description line and the title row of our table
%>
<table border="1" cellspacing="0" cellpadding="2">
<%
' First deal with any subdirectories. This is where the recursive
' script varies from the normal one. Take a look at how we build
' the link URLs.
' Show a link to the parent folder is applicable.
If strFullPath <> strRootPath Then
%>
<tr>
<td><a href="<%= strThisPage & "?path=" & Left(strPath, InStrRev(strPath, "/") - 1) %>">..</a></td>
</tr>
<%
End If
' Show a link for each folder. The link calls this script again
' and passes it the path to the folder clicked upon.
For Each objItem In objFolder.SubFolders
' Deal with the stupid VTI's that keep giving our visitors 404's
If InStr(1, objItem, "_vti", 1) = 0 Then
%>
<tr>
<td><a href="<%= strThisPage & "?path=" & strPath & "/" & objItem.Name %>"><%= objItem.Name %></a></td>
</tr>
<%
End If
Next 'objItem
' Now that I've done the SubFolders, do the files!
For Each objItem In objFolder.Files
%>
<tr>
<td><a href="<%= strFullPath & "/" & objItem.Name %>"><%= objItem.Name %></a></td>
</TR>
<%
Next 'objItem
' All done! Kill off our object variables.
Set objItem = Nothing
Set objFolder = Nothing
Set objFSO = Nothing
%>
</table>
Come fare?
Grazie fin da ora per l'attenzione.