%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
How to access files.
Select Desired File... <%'Joel Martinez 2001 dim jm_fso, jm_file, jm_types, jm_path, jm_folder,jm_show,jm_i,jm_ext jm_ext=false jm_path = "./" jm_types = split(replace("zip,doc,xls,ppt,pdf"," ",""),",") Set jm_fso = Server.CreateObject("Scripting.FileSystemObject") Set jm_folder = jm_fso.GetFolder(Server.MapPath(jm_path)) For Each jm_file in jm_folder.Files jm_show=false for jm_i=0 to ubound(jm_types,1) If lcase(right(jm_file.name,3)) = jm_types(jm_i) then jm_show=true next If jm_show=true then if jm_ext=true then response.write "" & jm_File.Name & "" &vbcrlf else response.write "" & mid(jm_File.Name,1,len(jm_File.Name)-4) & "" &vbcrlf end if end if next set jm_file=nothing set jm_folder = nothing set jm_fso=nothing%>
2002 © Torpac Inc. All rights reserved. Use of this site indicates you accept the Terms of Use. Torpac is a registered trademark of Torpac Inc.