Folders représente une collection de tous les objets File à l'intérieur d'un dossier.
CompatibilitéDisponibilité
JScript 1
PropriétésPropriété | Description |
---|---|
Count | retourne le nombre d'éléments dans une collection ou dans un objet Dictionary. |
Item(clé) [= item] | définit ou retourne un item pour une clé spécifiée d'un objet Dictionary. |
Propriété | Description |
---|---|
Add(clé, item) | ajoute une paire clé-item à un objet Dictionary. |
<html> <head> <title>Démonstration de Files</title> <script language="jscript"> function ListeRep(rep) { var fso, nomRep, liste, info=""; fso = new ActiveXObject("Scripting.FileSystemObject"); nomRep = fso.GetFolder(rep); liste = new Enumerator(nomRep.SubFolders); for (; !liste.atEnd(); liste.moveNext()) { info += fc.item(); info += "<br>"; } return(s); } </script> </head> <body> <a href="javascript:ListeRep('c:&&')"> Liste des répertoires sur C:& </a> </body> </html> |