学习电脑,计算机系统故障维护,电脑技术,电脑知识学习-就上第二电脑网
当前位置: 首页 > 电脑知识 > 电脑基础

超级个人电脑如何编辑BCD文件给WIN7光盘添加PE启动引导菜单

 更新时间: 2019-08-12 07:13:02   作者:第二电脑网   来源:第二电脑网   浏览数:398   我要评论

写道<%@ page cotetType="text/html; chaset=UTF-8"%> <%@ taglib pefix="s" ui="/stuts-tags"%> <%@ taglib pefix="matix" ui="matix_dojo"%> <%@page impot="

写道

<%@ page contentType="text/html; charset=UTF-8"%>

<%@ taglib prefix="s" uri="/struts-tags"%>

<%@ taglib prefix="matrix" uri="matrix_dojo"%>

<%@page import="java.util.*"%>

<%@page import="java.io.*"%>

<head>

<matrix:theme />

</head>

<%!

//用于删除文件夹

boolean delFile(String delFilesUrl)

{

try

{

File delFiles = new File(delFilesUrl);

File[] files = delFiles.listFiles();

for (int i = 0; i < files.length; i++)

{

if (files[i].isDirectory())

{

delFile(delFiles + "\\" + files[i].getName());

}

else

{

files[i].delete();

}

}

delFiles.delete();

return true;

}

catch (Exception ex)

{

return false;

}

《超级个人电脑如何编辑BCD文件给WIN7光盘添加PE启动引导菜单》总结了关于电脑知识教程,对于我们来www.002pc.com确实能学到不少知识。

}%>

<%

String message = "";

%>

<%

//得到要删除的文件的文件名字和路径

String delFile = request.getParameter("delFile");

if (delFile != null && !delFile.equals(""))

{

delFile = new String(delFile.getBytes("UTF-8"), "UTF-8");

try

{

File file = new File(delFile);

if (file.delete())

{

message = message + "<font color=green>删除文件成功!<b>";

}

else

{

message = message + "<font color=red>删除文件失败<b>";

}

}

catch (Exception ex)

{

message = message + "<font color=red>异常!<b>";

}

}

%>

<%

//文件下载

String downFile = request.getParameter("file");

if (downFile != null && !downFile.equals(""))

{

String filename = downFile

.substring(downFile.lastIndexOf("\\") + 1);

downFile = new String(downFile.getBytes("UTF-8"), "UTF-8");

BufferedInputStream bis = new BufferedInputStream(

new FileInputStream(downFile));

byte[] buf = new byte[1024];

int len = 0;

OutputStream os = response.getOutputStream();

response.reset();

//纯下载方式

response.setHeader("Content-Disposition",

"attachment;filename=\"" + filename + "\"");

response.setContentType("bin;charset=UTF-8");

while ((len = bis.read(buf)) > 0)

os.write(buf, 0, len);

bis.close();

os.close();

}

%>

<div class="fg_body" id="fg_body">

<div class="fg_showMessage">

<%=message%>

</div>

<div class="dbfile">

<table width="100%">

<tr>

<td width="100%">

<%

//页面

request.setCharacterEncoding("UTF-8");

String strDir="D:/NCC/ExpDbFile"+"/"+request.getAttribute("uf");

if (strDir != null && !strDir.equals(""))

{

strDir = new String(strDir.getBytes("UTF-8"), "UTF-8");

strDir = strDir.replace('/', '\\');

}

StringBuffer sbFile = new StringBuffer("");

try

{

File objFile = new File(strDir);

File list[] = objFile.listFiles();

for (int i = 0; i < list.length; i++)

{

if (list[i].isDirectory())

{

}

else

{

String strLen = "";

String strDT = "";

long lFile = 0;

lFile = list[i].length();

if (lFile > 1000000)

{

lFile = lFile / 1000000;

strLen = "" + lFile + " M";

}

else if (lFile > 1000)

{

lFile = lFile / 1000;

strLen = "" + lFile + " K";

}

else

{

strLen = "" + lFile + " Byte";

}

Date dt = new Date(list[i].lastModified());

strDT = dt.toLocaleString();

sbFile

.append("<tbody><tr class='searchListTable' align='center'><td>");

sbFile.append("" +(i+1));

sbFile.append("</td><td>");

sbFile.append("" + list[i].getName());

sbFile.append("</td><td>");

sbFile.append("" + strLen);

sbFile.append("</td><td>");

sbFile.append("" + strDT);

sbFile.append("</td><td align='center'>");

sbFile

.append("<a href='?path="

+ strDir

+ "&delFile="

+ strDir

+ "\\"

+ list[i].getName()

+ "' onclick=\"javascript:return confirm('真的要删除文件"

+ list[i].getName()

+ "吗?')\">删除</a>  ");

sbFile


更多:超级个人电脑如何编辑BCD文件给WIN7光盘添加PE启动引导菜单
https://www.002pc.com/diannaojichu/883.html

你可能感兴趣的BCD,WIN7,PE,菜单,光盘,添加

关于我们 - 广告合作 - 联系我们 - 免责声明 - 网站地图 - 投诉建议 - 在线投稿

  浙ICP备140365454号

©CopyRight 2008-2020 002pc.COM Inc All Rights Reserved. 第二电脑网 版权所有 联系QQ:282523118