PDA

View Full Version : [asp] come visualizzare tutte le cartelle in una cartella


Janky
17-07-2005, 01:28
come faccio a visualizzare in un campo <select> tutte le cartelle presenti in una directory?

matpez
17-07-2005, 02:01
Adatti questo codice alla tua esigenza :)


Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
Set cartella = objFSO.GetFolder(Server.mappath("\abc\"))

For Each objItem In cartella.SubFolders
response.write objItem.Name
Next

set cartella=nothing
set objFSO=nothing

Janky
17-07-2005, 02:40
a ecco, sto ancora imparando asp e non conoscevo SubFolders

grazie :)