100分求asp读取文件夹以及文件夹下照片问题

chen2k 2008-01-29 04:04:24
1.asp如何读取一个特定文件下下所有的字文件夹,并且在页面上显示出来
2.点击显示出来的某个文件夹,显示出那个文件夹下所有的资金照片
...全文
668 9 打赏 收藏 转发到动态 举报
写回复
用AI写文章
9 条回复
切换为时间正序
请发表友善的回复…
发表回复
chen2k 2008-01-31
  • 打赏
  • 举报
回复
谢谢楼上2位,先给分了,再慢慢看
xr998 2008-01-29
  • 打赏
  • 举报
回复
1.遍历指定文件夹下面的子文件夹(用一个函数来遍历,传递参数为指定文件夹名称,还可以在函数内部自己调用自己,以便遍历全部文件夹)

function ShowFolder(FolderPath)
Set fso = CreateObject("Scripting.FileSystemObject")
Set f = fso.GetFolder(Server.MapPath(FolderPath))
Set sf = f.SubFolders

for each ff in sf
'遍历下级子目录
ShowFolder(ff.name)
'显示图片
ShowPic(FolderPath & "/" & ff.name)
Next
End Function

function ShowPic(FolderPath)
Set fso = CreateObject("Scripting.FileSystemObject")
Set f = fso.GetFolder(Server.MapPath(FolderPath))
set files = f.files

for each file in files
if(instr(file.name,".jpg") or instr(file.name,".gif"))Then
'如果是图片,就显示
response.write "<img src=""" & FolderPath & "/" & file.name & ""/>"
end if
next
end function
  • 打赏
  • 举报
回复
上面例子中所说的那个delsp.asp的内容:
<%upath=request("filepath")
'Const SaveUpFilesPath=""&upath&""
Const MaxPerPage=20
dim strFileName
dim totalPut,CurrentPage,TotalPages
dim UploadDir,TruePath,fso,theFolder,theFile,whichfile,thisfile,FileCount,TotleSize
strFileName="delsp.asp"

if request("page")<>"" then
currentPage=cint(request("page"))
else
currentPage=1
end if

if right(upath,1)<>"/" then
UploadDir=upath & "/"
else
UploadDir=upath
end if
TruePath=Server.MapPath(UploadDir)
If not IsObjInstalled("Scripting.FileSystemObject") Then
Response.Write "<b><font color=red>你的服务器不支持 FSO(Scripting.FileSystemObject)! 不能使用本功能</font></b>"
Else
set fso=CreateObject("Scripting.FileSystemObject")
if request("Action")="Del" then
whichfile=server.mappath(Request("FileName"))
Set thisfile = fso.GetFile(whichfile)
thisfile.Delete True
response.Write("<script>alert('删除成功');location.href='delsp.asp?filepath="&upath&"'</script>")
end if
%>
<script language="JavaScript">
function ConfirmDel()
{
if (confirm("你真的要删除此文件吗!"))
return true;
else
return false;
}
</script>
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0" style="font-size:10px">
<tr>
<td width="862" align="center" valign="top"> <br>
<div style="height:50px"></div>
<div align="center"><span class="boldfaced">视频管理</span></div>
<div align="center"><hr width="80%" /></div>
<div align="center">文件夹路径[<font color="red"><%=TruePath%></font>]</div>
<%
if fso.FolderExists(TruePath)then
FileCount=0
TotleSize=0
Set theFolder=fso.GetFolder(TruePath)
For Each theFile In theFolder.Files
FileCount=FileCount+1
TotleSize=TotleSize+theFile.Size
next
totalPut=FileCount
if currentpage<1 then
currentpage=1
end if
if (currentpage-1)*MaxPerPage>totalput then
if (totalPut mod MaxPerPage)=0 then
currentpage= totalPut \ MaxPerPage
else
currentpage= totalPut \ MaxPerPage + 1
end if
end if
if currentPage=1 then
showpage2 strFileName,totalput,MaxPerPage
call showContent
showpage2 strFileName,totalput,MaxPerPage
response.write "<br><div align='center'>本页共显示 <b>" & FileCount & "</b> 个文件,占用 <b>" & TotleSize\1024 & "</b> K</div>"
else
if (currentPage-1)*MaxPerPage<totalPut then
showpage2 strFileName,totalput,MaxPerPage
call showContent
showpage2 strFileName,totalput,MaxPerPage
response.write "<br><div align='center'>本页共显示 <b>" & FileCount & "</b> 个文件,占用 <b>" & TotleSize\1024 & "</b> K</div>"
else
currentPage=1
showpage2 strFileName,totalput,MaxPerPage
call showContent
showpage2 strFileName,totalput,MaxPerPage
response.write "<br><div align='center'>本页共显示 <b>" & FileCount & "</b> 个文件,占用 <b>" & TotleSize\1024 & "</b> K</div>"
end if
end if
else
response.write "找不到文件夹!可能是配置有误!"
end if
end if
%>

<%sub showContent()
dim c
FileCount=0
TotleSize=0
%>
<table width="700" style="border:1pt solid #66CCFF" align="center" cellpadding="0" cellspacing="2" class="border">
<tr bgcolor="A4B6D7" class="title">
<td width="118" height="25" align="center">文件名</td>
<td width="84" height="20" align="center">文件大小</td>
<td width="134" height="20" align="center">文件类型</td>
<td width="160" height="20" align="center">最后修改时间</td>
<td width="83" height="20" align="center">操作</td>
</tr>


<%
For Each theFile In theFolder.Files
c=c+1
if FileCount>=MaxPerPage then
exit for
elseif c>MaxPerPage*(CurrentPage-1) then

%>
<tr class="tdbg">
<td height="22" bgcolor="F2F8FF"><a href="<%=(UploadDir & theFile.Name)%>" target="_blank"><strong> <%=theFile.Name%></strong></a></td>
<td align="right" bgcolor="F2F8FF"><%=theFile.size%>字节</td>
<td align="center" bgcolor="F2F8FF"><%=theFile.type%></td>
<td align="center" bgcolor="F2F8FF"><%=theFile.DateLastModified%></td>
<td align="center" bgcolor="F2F8FF"><%theFilepath=split(UploadDir,"/")
thepath=theFilepath(1)&"/"&theFilepath(2)&"/"
sql1="select * from 表一 where url='"&thepath&theFile.Name&"'"
'sql2="select * from 表二 where photo='upfile/'"& theFile.Name
set rs1=server.CreateObject("adodb.recordset")
'set rs2=server.CreateObject("adodb.recordset")
rs1.open sql1,conn1,1,1
'rs2.open sql2,conn1,1,1
if rs1.eof then%><a href="?Action=Del&filepath=<%=upath%>&FileName=<%=UploadDir&theFile.Name%>" onClick="return ConfirmDel()"><font color="#FF0000">多余可删除</font></a><%
else
response.Write "文件正使用"
end if
rs1.close:set rs1=nothing%></td>
</tr>
<%
FileCount=FileCount+1
TotleSize=TotleSize+theFile.Size
end if
Next
%>
</table>
<%end sub%>
</td>
</tr>
</table>
<!-- include file="Inc/Foot.asp" -->
<%
sub showpage2(sfilename,totalnumber,maxperpage)
dim n, i,strTemp
if totalnumber mod maxperpage=0 then
n= totalnumber \ maxperpage
else
n= totalnumber \ maxperpage+1
end if
strTemp= "<table align='center'><form name='showpages' method='Post' action='" & sfilename & "'><tr><td>"
strTemp=strTemp & "共 <b>" & totalnumber & "</b> 个文件,占用 <b>" & TotleSize\1024 & "</b> K   "
sfilename=JoinChar(sfilename)
if CurrentPage<2 then
strTemp=strTemp & "首页 上一页 "
else
strTemp=strTemp & "<a href='" & sfilename & "page=1'>首页</a> "
strTemp=strTemp & "<a href='" & sfilename & "page=" & (CurrentPage-1) & "'>上一页</a> "
end if

if n-currentpage<1 then
strTemp=strTemp & "下一页 尾页"
else
strTemp=strTemp & "<a href='" & sfilename & "page=" & (CurrentPage+1) & "'>下一页</a> "
strTemp=strTemp & "<a href='" & sfilename & "page=" & n & "'>尾页</a>"
end if
strTemp=strTemp & " 页次:<strong><font color=red>" & CurrentPage & "</font>/" & n & "</strong>页 "
strTemp=strTemp & " <b>" & maxperpage & "</b>" & "个文件/页"
strTemp=strTemp & " 转到:<select name='page' size='1' onchange='javascript:submit()'>"
for i = 1 to n
strTemp=strTemp & "<option value='" & i & "'"
if cint(CurrentPage)=cint(i) then strTemp=strTemp & " selected "
strTemp=strTemp & ">第" & i & "页</option>"
next
strTemp=strTemp & "</select>"
strTemp=strTemp & "</td></tr></form></table>"
response.write strTemp
end sub
%>
</body>
</html>
  • 打赏
  • 举报
回复
再给一个读子文件夹的
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>上传相册文件管理</title>
<link rel="stylesheet" type="text/css" href="../style.css">
</head>

<body>
<%
Const SaveUpFilesPath="upsp"
Const MaxPerPage=20
dim strFileName
dim totalPut,CurrentPage,TotalPages
dim UploadDir,TruePath,fso,theFolder,theFile,whichfile,thisfile,FileCount,TotleSize
strFileName="files.asp"

if request("page")<>"" then
currentPage=cint(request("page"))
else
currentPage=1
end if

if right(SaveUpFilesPath,1)<>"/" then
UploadDir="../"& SaveUpFilesPath & "/"
else
UploadDir="../"& SaveUpFilesPath
end if
TruePath=Server.MapPath(UploadDir)
If not IsObjInstalled("Scripting.FileSystemObject") Then
Response.Write "<b><font color=red>你的服务器不支持 FSO(Scripting.FileSystemObject)! 不能使用本功能</font></b>"
Else
set fso=CreateObject("Scripting.FileSystemObject")
if request("Action")="Del" then
whichfile=server.mappath(Request("FileName"))
Set thisfile = fso.GetFile(whichfile)
thisfile.Delete True
end if
%>
<script language="JavaScript">
function ConfirmDel()
{
if (confirm("你真的要删除此文件吗!"))
return true;
else
return false;
}
</script>
<%
'set fso=server.CreateObject("Scripting.FileSystemObject")
'set folder1=fso.getFolder(TruePath)
'response.write "<br>------------列出所有文件:"
'For Each theFile In folder1.SubFolders
'response.write ("<br>"&theFile&"("&theFile.size&")")
'next
'set myfolder=nothing
'set mfo=nothing %>
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0" style="font-size:10px">
<tr>
<td width="862" align="center" valign="top"> <br>
<div style="height:50px"></div>
<div align="center"><strong>视频文件夹</strong></div>
<div align="center"><hr width="80%" /></div>
<div align="center">文件夹路径[<font color="red"><%=TruePath%></font>]</div>
<%
if fso.FolderExists(TruePath)then
FileCount=0
TotleSize=0
Set theFolder=fso.GetFolder(TruePath)
For Each theFile In theFolder.SubFolders
FileCount=FileCount+1
TotleSize=TotleSize+theFile.Size
next
totalPut=FileCount
if currentpage<1 then
currentpage=1
end if
if (currentpage-1)*MaxPerPage>totalput then
if (totalPut mod MaxPerPage)=0 then
currentpage= totalPut \ MaxPerPage
else
currentpage= totalPut \ MaxPerPage + 1
end if
end if
if currentPage=1 then
showpage2 strFileName,totalput,MaxPerPage
call showContent
showpage2 strFileName,totalput,MaxPerPage
response.write "<br><div align='center'>本页共显示 <b>" & FileCount & "</b> 个文件夹,占用 <b>" & TotleSize\1024 & "</b> K</div>"
else
if (currentPage-1)*MaxPerPage<totalPut then
showpage2 strFileName,totalput,MaxPerPage
call showContent
showpage2 strFileName,totalput,MaxPerPage
response.write "<br><div align='center'>本页共显示 <b>" & FileCount & "</b> 个文件夹,占用 <b>" & TotleSize\1024 & "</b> K</div>"
else
currentPage=1
showpage2 strFileName,totalput,MaxPerPage
call showContent
showpage2 strFileName,totalput,MaxPerPage
response.write "<br><div align='center'>本页共显示 <b>" & FileCount & "</b> 个文件,占用 <b>" & TotleSize\1024 & "</b> K</div>"
end if
end if
else
response.write "找不到文件夹!可能是配置有误!"
end if
end if
%>

<%sub showContent()
dim c
FileCount=0
TotleSize=0
%>
<table width="700" style="border:1pt solid #66CCFF" align="center" cellpadding="0" cellspacing="2" class="border">
<tr bgcolor="A4B6D7" class="title">
<td width="118" height="25" align="center">文件夹名</td>
<td width="84" height="20" align="center">文件大小</td>
<td width="134" height="20" align="center">文件类型</td>
<td width="200" height="20" align="center">最后修改时间</td>
<td width="43" height="20" align="center">操作</td>
</tr>
<%
For Each theFile In theFolder.SubFolders
c=c+1
if FileCount>=MaxPerPage then
exit for
elseif c>MaxPerPage*(CurrentPage-1) then

%>
<tr class="tdbg">
<td height="22" align="center" bgcolor="F2F8FF"><a href="<%=(UploadDir & theFile.Name)%>" target="_blank"><strong> <%=theFile.Name%></strong></a></td>
<td width="84" align="right" bgcolor="F2F8FF"><%=theFile.size%>字节</td>
<td width="134" align="center" bgcolor="F2F8FF"><%=theFile.type%></td>
<td width="200" align="center" bgcolor="F2F8FF"><%=theFile.DateLastModified%></td>
<td width="43" align="center" bgcolor="F2F8FF"><a href="delsp.asp?filepath=<%=UploadDir & theFile.Name%>">打开</a></td>
</tr>
<%
FileCount=FileCount+1
TotleSize=TotleSize+theFile.Size
end if
Next

%>
</table>
<%end sub%>
</td>
</tr>
</table>
<!-- include file="Inc/Foot.asp" -->
<%
sub showpage2(sfilename,totalnumber,maxperpage)
dim n, i,strTemp
if totalnumber mod maxperpage=0 then
n= totalnumber \ maxperpage
else
n= totalnumber \ maxperpage+1
end if
strTemp= "<table align='center'><form name='showpages' method='Post' action='" & sfilename & "'><tr><td>"
strTemp=strTemp & "共 <b>" & totalnumber & "</b> 个文件夹,占用 <b>" & TotleSize\1024 & "</b> K   "
sfilename=JoinChar(sfilename)
if CurrentPage<2 then
strTemp=strTemp & "首页 上一页 "
else
strTemp=strTemp & "<a href='" & sfilename & "page=1'>首页</a> "
strTemp=strTemp & "<a href='" & sfilename & "page=" & (CurrentPage-1) & "'>上一页</a> "
end if

if n-currentpage<1 then
strTemp=strTemp & "下一页 尾页"
else
strTemp=strTemp & "<a href='" & sfilename & "page=" & (CurrentPage+1) & "'>下一页</a> "
strTemp=strTemp & "<a href='" & sfilename & "page=" & n & "'>尾页</a>"
end if
strTemp=strTemp & " 页次:<strong><font color=red>" & CurrentPage & "</font>/" & n & "</strong>页 "
strTemp=strTemp & " <b>" & maxperpage & "</b>" & "个文件夹/页"
strTemp=strTemp & " 转到:<select name='page' size='1' onchange='javascript:submit()'>"
for i = 1 to n
strTemp=strTemp & "<option value='" & i & "'"
if cint(CurrentPage)=cint(i) then strTemp=strTemp & " selected "
strTemp=strTemp & ">第" & i & "页</option>"
next
strTemp=strTemp & "</select>"
strTemp=strTemp & "</td></tr></form></table>"
response.write strTemp
end sub
%>
</body>
</html>
  • 打赏
  • 举报
回复
再给你一个例子

<%
Const SaveUpFilesPath="Performing/upfile"
Const MaxPerPage=20
dim strFileName
dim totalPut,CurrentPage,TotalPages
dim UploadDir,TruePath,fso,theFolder,theFile,whichfile,thisfile,FileCount,TotleSize
strFileName="file.asp"

if request("page")<>"" then
currentPage=cint(request("page"))
else
currentPage=1
end if

if right(SaveUpFilesPath,1)<>"/" then
UploadDir="../" & SaveUpFilesPath & "/"
else
UploadDir="../" & SaveUpFilesPath
end if
TruePath=Server.MapPath(UploadDir)
If not IsObjInstalled("Scripting.FileSystemObject") Then
Response.Write "<b><font color=red>你的服务器不支持 FSO(Scripting.FileSystemObject)! 不能使用本功能</font></b>"
Else
set fso=CreateObject("Scripting.FileSystemObject")
if request("Action")="Del" then
whichfile=server.mappath(Request("FileName"))
Set thisfile = fso.GetFile(whichfile)
thisfile.Delete True
end if

%>
<script language="JavaScript">
function ConfirmDel()
{
if (confirm("你真的要删除此文件吗!"))
return true;
else
return false;
}
</script>
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0" style="font-size:10px">
<tr>
<td width="862" align="center" valign="top"> <br>
<div style="height:50px"></div>
<div align="center"><strong>相 册 文 件 管 理</strong></div>
<div align="center"><hr width="80%" /></div>
<div align="center">文件夹路径[<font color="red"><%=TruePath%></font>]</div>
<%
if fso.FolderExists(TruePath)then
FileCount=0
TotleSize=0
Set theFolder=fso.GetFolder(TruePath)
For Each theFile In theFolder.Files
FileCount=FileCount+1
TotleSize=TotleSize+theFile.Size
next
totalPut=FileCount
if currentpage<1 then
currentpage=1
end if
if (currentpage-1)*MaxPerPage>totalput then
if (totalPut mod MaxPerPage)=0 then
currentpage= totalPut \ MaxPerPage
else
currentpage= totalPut \ MaxPerPage + 1
end if

end if
if currentPage=1 then
showpage2 strFileName,totalput,MaxPerPage
showContent
showpage2 strFileName,totalput,MaxPerPage
response.write "<br><div align='center'>本页共显示 <b>" & FileCount & "</b> 个文件,占用 <b>" & TotleSize\1024 & "</b> K</div>"
else
if (currentPage-1)*MaxPerPage<totalPut then
showpage2 strFileName,totalput,MaxPerPage
showContent
showpage2 strFileName,totalput,MaxPerPage
response.write "<br><div align='center'>本页共显示 <b>" & FileCount & "</b> 个文件,占用 <b>" & TotleSize\1024 & "</b> K</div>"
else
currentPage=1
showpage2 strFileName,totalput,MaxPerPage
showContent
showpage2 strFileName,totalput,MaxPerPage
response.write "<br><div align='center'>本页共显示 <b>" & FileCount & "</b> 个文件,占用 <b>" & TotleSize\1024 & "</b> K</div>"
end if
end if
else
response.write "找不到文件夹!可能是配置有误!"
end if
end if

sub showContent()
dim c
FileCount=0
TotleSize=0
%>
<table style="border:1pt solid #66CCFF" align="center" cellpadding="0" cellspacing="2" class="border">
<tr bgcolor="A4B6D7" class="title">
<td height="25" align="center">图片及名称</td>
<td width="84" height="20" align="center">文件大小</td>
<td width="134" height="20" align="center">文件类型</td>
<td width="160" height="20" align="center">最后修改时间</td>
<td width="80" height="20" align="center">操作</td>
</tr>
<%

For Each theFile In theFolder.Files
c=c+1
if FileCount>=MaxPerPage then
exit for
elseif c>MaxPerPage*(CurrentPage-1) then
%>
<tr class="tdbg">
<td bgcolor="F2F8FF" align="center">
<table cellpadding="0" cellspacing="0" border="1" align="center">
<tr><td align="center"><img src="<%=(UploadDir & theFile.Name)%>" width="100" height="120" /></td></tr>
<tr><td><a href="<%=(UploadDir & theFile.Name)%>" target="_blank"><strong> <%=theFile.Name%></strong></a><td></tr>
</table>
</td>
<td width="84" align="right" bgcolor="F2F8FF"><%=theFile.size%>字节</td>
<td width="134" align="center" bgcolor="F2F8FF"><%=theFile.type%></td>
<td width="160" align="center" bgcolor="F2F8FF"><%=theFile.DateLastModified%></td>
<td width="80" align="center" bgcolor="F2F8FF">
<%sql="select * from 表一 where photo like '%"&theFile.name&"%'"
sql0="select * from 表二 where photo like '%"&theFile.name&"%'"
set rs=server.CreateObject("adodb.recordset")
rs.open sql,conn1,1,1
set rs0=conn1.execute(sql0)
if rs.eof and rs0.eof then
%><a href="?Action=Del&FileName=<%=UploadDir&theFile.Name%>" onClick="return ConfirmDel()" style="color:#FF0000">多余可删除</a>
<%else%>正在使用<%end if%><%rs0.close:set rs0=nothing:rs.close:set rs=nothing%>
</td>
</tr>
<%
FileCount=FileCount+1
TotleSize=TotleSize+theFile.Size
end if
Next
%>
</table>
<%
end sub
%> </td>
</tr>
</table>

<!-- include file="Inc/Foot.asp" -->
<%
sub showpage2(sfilename,totalnumber,maxperpage)
dim n, i,strTemp
if totalnumber mod maxperpage=0 then
n= totalnumber \ maxperpage
else
n= totalnumber \ maxperpage+1
end if
strTemp= "<table align='center'><form name='showpages' method='Post' action='" & sfilename & "'><tr><td>"
strTemp=strTemp & "共 <b>" & totalnumber & "</b> 个文件,占用 <b>" & TotleSize\1024 & "</b> K   "
sfilename=JoinChar(sfilename)
if CurrentPage<2 then
strTemp=strTemp & "首页 上一页 "
else
strTemp=strTemp & "<a href='" & sfilename & "page=1'>首页</a> "
strTemp=strTemp & "<a href='" & sfilename & "page=" & (CurrentPage-1) & "'>上一页</a> "
end if

if n-currentpage<1 then
strTemp=strTemp & "下一页 尾页"
else
strTemp=strTemp & "<a href='" & sfilename & "page=" & (CurrentPage+1) & "'>下一页</a> "
strTemp=strTemp & "<a href='" & sfilename & "page=" & n & "'>尾页</a>"
end if
strTemp=strTemp & " 页次:<strong><font color=red>" & CurrentPage & "</font>/" & n & "</strong>页 "
strTemp=strTemp & " <b>" & maxperpage & "</b>" & "个文件/页"
strTemp=strTemp & " 转到:<select name='page' size='1' onchange='javascript:submit()'>"
for i = 1 to n
strTemp=strTemp & "<option value='" & i & "'"
if cint(CurrentPage)=cint(i) then strTemp=strTemp & " selected "
strTemp=strTemp & ">第" & i & "页</option>"
next
strTemp=strTemp & "</select>"
strTemp=strTemp & "</td></tr></form></table>"
response.write strTemp
end sub
%>
</body>
</html>
  • 打赏
  • 举报
回复
<html>
<body>读取一个文件相关信息的范例<br><br>
<%
Dim objFSO,objFile,filename,filepath '声明一个名称为 objFSO 的变量以存放对象实例
filepath="../Performing/upfile"
filename=Server.MapPath(filepath)
Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
If objFSO.FileExists(filename) Then
Set objFile = objFSO.GetFile(filename)
Response.Write "文件的名称:"&objFile.Name&"<br>"
Response.Write "文件的路径:"&objFile.Path&"<br>"
Response.Write "文件的建立日期:"&objFile.DateCreated&"<br>"
Response.Write "文件的最后浏览日期:"&objFile.DateLastAccessed&"<br>"
Response.Write "文件的最后修改日期:"&objFile.DateLastModified&"<br>"
Response.Write "文件的大小:"&objFile.Size&"<br>"
Response.Write "文件的类型:"&objFile.Type&"<br>"
Response.Write "文件的属性:"&objFile.Attributes&"<br>"
Response.Write "文件的所在的驱动器:"&objFile.Drive&"<br>"
Response.Write "文件的所在的文件夹:"&objFile.ParentFolder&"<br>"
Else
Response.Write filename&"不存在,无法读取相关信息"
End If
Set objFile = Nothing
Set objFSO = Nothing '释放 FileSystemObject 对象实例内存空间
%>

<hr>当处理文件时,有些属性是需要了解的,下面是File对象的属性列表:<br>
■Attributes.这个属性类似于Dos命令的Attrib,显示当前文件的系统属性。例如Read-Only,Hidden,System等等<br>

■DateCreated.这个属性返回文件创建的时间和日期。<br>

■DateLastAccessed.这个属性返回该文件上一次被使用的日期和时间<br>

■DateLastModified.这个属性返回该文件上一次被修改的日期和时间<br>

■Drive. 这个属性返回值为该文件所在的驱动器<br>

■Name.这个属性返回该文件文件名<br>

■ParentFolder.这个属性返回值为该文件所处的文件夹<br>

■Path.返回该文件的全路径<br>

■Size.返回该文件的字节数<br>

■Type.返回该文件类型,例如Text文本,Asp文件,或者网络资源(HTML)<br>
</body>
</html>
xiaojing7 2008-01-29
  • 打赏
  • 举报
回复
asp中用fso中实现
MS像用数来实现
HLXK_114 2008-01-29
  • 打赏
  • 举报
回复
asp中用fso中实现
MS像用数来实现?
dsmy 2008-01-29
  • 打赏
  • 举报
回复
用FSO可以实现,可以到网上查一下

28,391

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧