Below is the function that displays all of a members previously uploaded files. It displays them in general folder older. Is there any way to make it reverse the sort?
Function ScanFolders(PathSpec) Dim fs, f, Folder, fc, s, File, FileList, FolderInfo, FileName, Name Set FolderInfo = Fso.GetFolder(PathSpec) Set FileList = FolderInfo.Files For Each File in FileList Name = Cstr(File.Name) FileName = UCase(Mid(Name,InStrRev(Name,"."))) if AdminAllowed then Name = SubFolderName & "/" & Name end if
Set f = Fso.GetFolder(PathSpec) if AdminAllowed then Set fc = f.SubFolders For Each Folder in fc SubFolderName = "/" & Folder.Name '## if LCase(Mid(SubFolderName,1,5)) <> "/_vti" then '## Uncomment Above Line if you use Front Page and you don't want "_vti" directories to show Call ScanFolders(PathSpec & "/" & Folder.Name) '## end if '## Uncomment Above Line if you use Front Page and you don't want "_vti" directories to show Next end if
End Function
if UseFile = "select" then %><!--#INCLUDE FILE="inc_footer_short.asp" --><% else %><!--#INCLUDE FILE="inc_footer.asp" --><% end if
Function ScanFolders(PathSpec)
Dim fs, f, Folder, fc, r, s File, FileList, FolderInfo, FileName, Name
Set FolderInfo = FSO.GetFolder(PathSpec)
Set FileList = FolderInfo.Files
s = FolderInfo.Count - 1
ReDim r(s)
For Each File In FileList
Set r(s) = File
s = s - 1
Next
For Each File in r(s)
Name = CStr(File.Name)
FileName = UCase(Mid(Name,InStrRev(Name,".")))
If AdminAllowed Then Name = SubFolderName & "/" & Name
If UseFile = "select" then
Response.Write "<hr><div class=""left"" style=""width:130px""><img class=""right"" style=""max-width:125px;height:125px"" src=""" & UploadFolder & "/" & strDBNTUserName & "/" & Name & """ alt=""http://" & MyDomainName & UploadFolder & "/" & strDBNTUserName & "/" & Name & """></div>" & vbNewline & _
"<INPUT style=""margin:50px 0 15px 0"" TYPE=""submit"" NAME=""enter"" value=""Insert"" onclick=""JavaScript:window.location=('myfiles.asp?InsertFile=true&FileToInsert=" & Name & "');"">" & "<br />" & Name & vbNewline & _
"<br clear=""all"" />"
End If
Next
Set f = Fso.GetFolder(PathSpec)
If AdminAllowed Then
Set fc = f.SubFolders
For Each Folder in fc
SubFolderName = "/" & Folder.Name
Next
End If
End Function
If UseFile = "select" Then WriteFooterShort Else WriteFooter