InStrRev ("Abcd.jpg", ".") calculates the first occurrence in the abcd.jpg. The location is the number of characters =5
Mid ("Abcd.jpg", 1,4) takes the top four ABCD
Mid ("Abcd.jpg", 5) is taken from five bits (including fifth digit). jpg
Take the prefix ABC
FullPath = "Abc.jpg"
F = Mid (Fullpath,1,instrrev (FullPath, ".") -1)
Response.Write F
Marry suffix jpg
FullPath = "Abc.jpg"
F = Mid (Fullpath,instrrev (FullPath, ".") +1)
Response.Write F
<%
Set myfileobject=server.createobject ("Scripting.FileSystemObject") ' Creates a Folder object
Foldername=server.mappath ("./")
Set Myfolder=myfileobject.getfolder (foldername)
I=0 ' Cycle display of folders
Response.Write "Show Folders:"
For each thing in Myfolder.subfolders
Response.Write ("<br>" &thing)
I=i+1
Next
Response.Write "<br> Total" &i& "Folders"
Response.Write "<p> Show file name" ' Loop to display the files
I=0
For each thing in Myfolder.files
Response.Write ("<br>" &thing)
I=i+1
Next
Response.Write "<br> Total" &i& "files"
%>
ASP reads the file name under the specified directory