Chinaunix首页 | 论坛 | 博客
  • 博客访问: 272934
  • 博文数量: 53
  • 博客积分: 4010
  • 博客等级: 上校
  • 技术积分: 496
  • 用 户 组: 普通用户
  • 注册时间: 2008-03-06 11:05
文章分类

全部博文(53)

文章存档

2011年(1)

2008年(52)

我的朋友

分类: WINDOWS

2008-05-12 10:17:36

 public static void main(String[] args) {
        getFile("D:\\test");
    }
 
    public static void getFile(String filepath) {
        //com.bizwink.cms.util.Convert con = new com.bizwink.cms.util.Convert();
        File file = new File(filepath);
        File[] listfile = file.listFiles();
        for (int i = 0; i < listfile.length; i++) {
            //System.out.println("****** = "+listfile[i].getPath().toString());
            if (!listfile[i].isDirectory()) {
                //com.bizwink.cms.util.Convert con = new com.bizwink.cms.util.Convert();
                String temp=listfile[i].toString().substring(7,listfile[i].toString().length()) ;
                System.out.println("temp=="+temp);
                //con.convertFile(listfile[i].toString(), "D:\\newtest"+temp, 0, 3);
                System.out.println("path=" + listfile[i]);
            } else {
                getFile(listfile[i].toString());
            }
        }
    }
阅读(1421) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~