• 企业400电话
  • 微网小程序
  • AI电话机器人
  • 电商代运营
  • 全 部 栏 目

    企业400电话 网络优化推广 AI电话机器人 呼叫中心 网站建设 商标✡知产 微网小程序 电商运营 彩铃•短信 增值拓展业务
    文件遍历排序函数
    %

    function bianli(path)

    'initiate
    path = server.mappath(path)
    set fso=server.CreateObject("scripting.filesystemobject")
    set objFolder=fso.GetFolder(path)
    set objfiles = objfolder.files

    '把文件名及文件路经存入theFiles数组
    int slot = 0
    Dim theFiles()
    redim theFiles(50)
    for each objFile in objFiles
    filename = objFile.name
    filePath = split(objFile.path,"docs\&;)
    thepath1 = "./docs/"
    thepath = thepath1 filepath(1)
    theFiles(slot) = filename"**"thepath
    slot = slot + 1
    if slot > UBound(theFiles) then
    ReDim Preserve theFiles(Slot+20)
    end if
    next
    ReDim Preserve theFiles(slot)


    '冒泡排序
    for i = 0 to UBound(theFiles)-2
    for j = i+1 to UBound(theFiles)-1
    if strComp(theFiles(i),theFiles(j)) = 1 then
    tmp = theFiles(i)
    theFiles(i) = theFiles(j)
    theFiles(j) = tmp
    end if
    next
    next

    '输出
    for i = 0 to UBound(theFiles)-1
    para = theFiles(i)
    filename = split(para,"**",-1,1)(0)
    filepath = split(para,"**",-1,1)(1)
    %>
    p align = "left">
    ---img src='../../images/arrow_orange.gif' width='14' height='11'>
    a href='%=filepath%>'>span class="activelink_yellow">%=filename%>/span>/a>
    /p>
    %
    next
    end function
    %>

    上一篇:FSO+递归生成文件列表(xml)
    下一篇:fso的一些特殊功能
  • 相关文章
  • 

    © 2016-2020 巨人网络通讯 版权所有

    《增值电信业务经营许可证》 苏ICP备15040257号-8

    文件遍历排序函数 文件,遍历,排序,函数,文件,