Bonjour ,
Je cherche à faire un script capable d'exploser une arborescence sur un Intranet ( à partir d'IE ).
Si le rep contient des dossiers fils, il faut pouvoir les afficher et les exploser en cliquant ( là est le pb )
Il faut aussi afficher les eventuels fichers presents au niveau de ce noeud
Si l'on atteint le plus bas niveau, il faut simplement afficher les fichiers et pouvoir les afficher dans la page Internet. ( Ca ca marche )
 
Voici mon source :
<html>
 
<head>
<SCRIPT LANGUAGE=vbscript>
<!--
 
Sub parcours_rep(repertoire)
 
 '--	Définition des Variables	--
 Dim fso, f, fo, f1,fc
 
 '--	Initialisation des Variables	--
 Set fso = CreateObject("Scripting.FileSystemObject" )
 	Set f   = fso.GetFolder(repertoire)
 Set fc  = f.Files
 Set fo  = f.subfolders
 'z=0
 
 '--	Si Le Repertoire N'est Pas Vide	--
 'if z=0 then
 	'IF fo.count<>0 Then
   For Each f1 in fo
   	parcours_rep(f1.path)
   Next
 	'End If
 'z=z+1
 'End If
 '--	Fait appelle a la procedure pour afficher les PDF	--
 afficher_pdf(repertoire)
End Sub
 
 
Sub afficher_pdf(repertoire)
 
 '--	Définition des Variables	--
 Dim fso, f, f1, fc,i, compteur,tableau_cache()
 
 '--	Initialisation des Variables	--
 redim tableau_cache(0)
 compteur=0
 Set fso = CreateObject("Scripting.FileSystemObject" )
 
 Set f = fso.GetFolder(repertoire)
 Set fc = f.Files
   
 	'--	Parcours Chaque Repertoire Et Recupere Chaque Fichier	--
 	For Each f1 in fc
   tableau_cache(compteur)=f1.name
   compteur=compteur+1
   ReDim Preserve tableau_cache(compteur)
 	Next
   
 	'--	Parcours le Tablx et affiche les Fichiers PDF	--
 	For i=0 To (UBound(tableau_cache)-1) 'parcours de tous les éléments du tableau
   If i = 0then
   	'If Right(LCase(tableau_cache(i)),4)=".pdf" then
     If Left(Right(LCase(repertoire),(Len(LCase(repertoire))-69)), 1)="\" Then
        document.write "<B><a href= onclick=" & afficher_fichier & "(" & repertoire & " )" & ";>" & Right(UCase(repertoire),(len(UCase(repertoire))-58)) & "</a></B></BR>"
 document.write "<B><a href= onclick=" & afficher_fichier & "(" & repertoire & " )" & ";>" & Right(UCase(repertoire),(len(UCase(repertoire))-58)) & "</a></B></BR>"
     Else        
        document.write "<B><a href= onclick=" & afficher_fichier & "(" & repertoire & " )" & ";>" & Right(UCase(repertoire),(len(UCase(repertoire))-58)) & "</a></B></BR>"
 document.write "<B><a href= onclick=" & afficher_fichier & "(" & repertoire & " )" & ";>" & Right(UCase(repertoire),(len(UCase(repertoire))-58)) & "</a></B></BR>"
     End If
   	'End If
   End If  
 	Next
End Sub
 
 
Sub afficher_fichier(repertoire)
 '--	Définition des Variables	--
 Dim fso, f, f1, fc,i, compteur,tableau_cache()
 
 '--	Initialisation des Variables	--
 redim tableau_cache(0)
 compteur=0
 
 '--	Instancie l'objet	--
 Set fso = CreateObject("Scripting.FileSystemObject" )
 Set f = fso.GetFolder(repertoire)
 Set fc = f.Files
   
 	'--	Parcours Chaque Repertoire Et Recupere Chaque Fichier	--
 	For Each f1 in fc
   tableau_cache(compteur)=f1.name
   compteur=compteur+1
   ReDim Preserve tableau_cache(compteur)
 	Next
   
 	'--	Parcours le Tablx et affiche les Fichiers PDF	--
 	FOR i=0 to (UBound(tableau_cache)-1) 'parcours de tous les éléments du tableau
   IF right(LCase(tableau_cache(i)),4)=".pdf" then
   	document.write "<a href='" & repertoire & "\" & tableau_cache(i) & "'>" & tableau_cache(i) & "</a>" & "<BR><br>"
   END IF
 	Next
end sub
 
-->
</SCRIPT>
<meta name="Microsoft Theme" content="blends 011">
</head>
 
Ie retourne l'erreur suivante à là ligne des smileys rouge: Type Incompatible ='afficher_rep'
 
Au secours !!!! Avez vous une idée ?
Merci d'avance  