In pratica, dopo aver mostrato i file della directory principale passata tramite
codice:
Percorso = Trim(LCase(Request.QueryString("percorso")))
come faccio a farmi restituire i file contenuti nelle sottocartelle su cui clicco di volta in volta?
la pagina file.asp ha il seguente
codice:
<%
Percorso = Request.QueryString("percorso")
If Right(Percorso,1) <> "\" then Percorso = Percorso & "\"
Set fs = CreateObject("Scripting.FileSystemObject")
Set f = fs.GetFolder(Percorso)
Set fc = f.Files
Numero_File = 0
FP = ""
DF = ""
For Each whatever in fc
Nome_File = Trim(LCase(whatever.name))
If Nome_File <> "" Then Numero_File = Numero_File + 1
Select Case Right(Nome_File,4)
Case ".txt"
FP = FP & Nome_File & "<BR>"
DF = DF & "File di testo<BR>"
.....    
End Select
Next
%>
<FONT FACE="Arial" SIZE=2>
<%If Numero_File = 0 then%>
Nella directory corrente non sono presenti file.
<%ElseIf Numero_File = 1 then%>
E' stato trovato un solo file:<HR>
<TABLE CELLSPACING=0 CELLPADDING=0 BORDER=0>
<TR>
<TD ALIGN=LEFT><FONT FACE="Arial" SIZE=2><%=FP%></FONT></TD>
<TD ALIGN=LEFT><FONT FACE="Arial" SIZE=2><%=DF%></FONT></TD>
</TR>
</TABLE>
<%Else%>
Sono stati trovati <%=Numero_File%> File:<HR>
<TABLE CELLPADDING=4  BORDER=1 WIDTH=100%>
<tr style="border-bottom-style: solid">
<td>Nome File</td>
<td>Tipo</td>
</tr>
<TR>
<TD ALIGN=LEFT><FONT FACE="Arial" SIZE=2><%=FP%></FONT></TD>
<TD ALIGN=LEFT><FONT FACE="Arial" SIZE=2><%=DF%></FONT></TD>
</TR>
</TABLE>
<%End If%>