Salve, ho una Function in VBscript che rileva la presenza di file in una determinata cartella, e se presenti, propone, la lista con alcune specifiche ed un link.
Vorrei portare il tutto in Javascrip:
sapete aiutarmi?codice:<% Function ShowFolderList(folderspec) Dim fso, f, f1, fc, s, cont Set fso = CreateObject("Scripting.FileSystemObject") Set f = fso.GetFolder(folderspec) Set fc = f.Files cont = 1 For Each f1 in fc if right(f1.name, 3) <> "asp" then if cont < 10 then cont = "0"& cont s = s & cont &": "& f1.name &" ("& f1.datelastmodified &") " s = s & VbTab & f1.size/1000000 & " Mb " cont = cont + 1 end if Next ShowFolderList = s End Function response.Write "<font face=""verdana"" size=""2"">"& ShowFolderList(server.MapPath("./")) &"</font>" %>
Graziee![]()

Rispondi quotando
