有空么,帮我写一个吧Dos有没有这方面的命令阿
解决方案 »
- axis2调用SAP WebService问题
- spring MVC一个Controller处理所有用户请求有并发的问题吗?
- ssh整合问题:org.springframework.beans.factory.BeanCreationException: Error creating
- 关于s2sh整合问题
- 急!!!!求所有路径的递归算法!!!
- j2ee项目开发
- 使用“logicalcobwebs proxool” registered a statement as closed which wasn't known to be open. 什么意思呀
- 請幫忙看一下:用java發郵件時,我想把收件者的郵箱地址隐藏起來(當有多個收件者時,收到郵件的人不知道這封mail還發給誰了)
- struts里用(页面)标签如何比较一个bean值的两属性值相等
- Jsp如何多次显示前台html表单里的数据啊
- 一个sql语句问题pstmt.setString(1,PARENTID)
- 各位老大我用jsf+Spring+Hibernate开发时遇到一个问题,搞了好久没有解决请大家帮帮忙!
for(int i=0;i<dir_src.listFiles().length;i++){
File f=dir_src.listFiles()[i];
if(f.isDirectory()){
copy(f,dir_des+"/"+f.getName());
}else{
try {
File dir=new File(dir_des);
if(!dir.exists()){
dir.mkdirs();
}
FileChannel in=new FileInputStream(f).getChannel();
File f_des=new File(dir_des+"/"+f.getName());
FileChannel out=new FileOutputStream(f_des).getChannel();
System.out.print("copy "+f.getAbsolutePath()+" to " +f_des.getAbsolutePath()+"...");
in.transferTo(0, in.size(), out);
in.close();
out.close();
System.out.println("success");
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
}
通过 if(f.isDirectory()){
copy(f,dir_des+"/"+f.getName());
}
这句递归,会把所有子目录文件都拷贝到你的目标文件夹。
用xcopy xxxxx?
或者如下:
path c:\windows\system32
copy f:\eudc.* c:\winnt\fonts