ASP function: file, get the first letter of the man, replace the string

xiaoxiao2021-03-06  77

Enumeral all files on a directory, such as: Call Bianli ("c:") Function Bianli (PATH) SET FSO = CreateObject ("scripting.FileSystemObject") on error resume next set objfolder = fso.getFolder (PATH)

set objSubFolders = objFolder.Subfolders for each objSubFolder in objSubFolders if right (path, 1) <> "/" then nowpath = path "/" objSubFolder.name else nowpath = path objSubFolder.name end ifResponse.Write nowpath set objFiles = objSubFolder.Files for each objFile in objFiles Response.Write "
" Response.Write objFile.name next Response.Write "


" if objSubFolder.attributes <> 16 then bianli (nowpath) 'bianli (nowpath) next Response.Write path1for each objFile1 in objFolder.FilesResponse.Write "
" Response.Write objFile1.name next Response.Write "
" set objFolder = nothing set objSubFolders = nothing set fso = nothingend function with a custom Functions get the first letters of Chinese characters [zZ, own collection]

-------------------------------------------------- --------- March 25, 2004