We are in the management of a station, usually upload a lot of files, such as pictures or compressed packets, and so on, how to not through FTP, and so on, and directly in the Web page can view all the content under a folder?
We are in the management of a station, usually upload a lot of files, such as pictures or compressed packets, and so on, how to not through FTP, and so on, and directly in the Web page can view all the content under a folder?
<%
' Create a case of a FileSystemObject object
Set myfileobject=server.createobject ("Scripting.FileSystemObject")
Path=server.mappath ("./folder") ' current directory of folder folders directory
' Create a Folder object
Set Myfolder=myfileobject.getfolder (PATH)
For each thing in Myfolder.subfolders ' get subfolders
Response.Write "<p> directory:" &thing
' Myfileobject.deletefolder thing delete folder, pay attention to using
Next
' Loop over the file
For each thing in Myfolder.files
Response.Write ("<p> file:" &thing) ' Output file path
' Myfileobject.deletefile thing ' Delete these files, this deletion is not recoverable, need to be used carefully
Next
%>