' Thierry DEMAN on error resume next ' ************** Initialisation des objets ***** Dim objFS, WshShell,WshNetwork SET wshshell = createObject ("Wscript.shell") SET wshnetwork = Wscript.createObject ("Wscript.Network") SET objFS=CreateObject ("Scripting.FileSystemObject") ' server = Wshshell.ExpandEnvironmentStrings("%COMPUTERNAME%") ' *************** initialiation des variables ***** DIM Nb, I ' Set up global data. TabStop = Chr(9) NewLine = Chr(13) Nb=0 Dim Fic(),Chem() ' *************** Debut du programme principal ***** wscript.echo "Recherche en cours" SET oFolder = objFS.getFolder("C:\") vExtension="htm" SearchFolder(oFolder) Wscript.QUIT '**************** Fin du Programme principal ***** '******************* Debut des fonctions ***** Function SearchFolder(Folder) Dim SubFolders, Files, oFile 'objets Dim Fichier 'Wscript.echo "Folder:" & TabStop & Folder.Path Set Files = Folder.Files If Files.Count <> 0 Then For Each oFile in Folder.Files ' wscript.echo(objFS.GetExtensionName(oFile.Name)) if lcase(objFS.GetExtensionName(oFile.Name)) = vExtension then wscript.echo(oFile.name+" "+ofile.path) End If Next End If Set SubFolders = Folder.SubFolders If SubFolders.Count <> 0 Then For Each SubFolder In SubFolders SearchFolder(SubFolder) Next End If End Function ' ******* Fin des modules *********************