package IOlv.QQzhaopian;
import java.io.*;
public class Test{
public static void main(String[] args) throws Exception {
File imgPath = new File("D:\\img");//复制地址
File toImgPath = new File("D:\\dd");//复制到的地址
File[] imgs = imgPath.listFiles();
for (int i = 0; i < imgs.length; i++) {
FileInputStream in = new FileInputStream(imgs[i]);
File img = new File(toImgPath, imgs[i].getName());
FileOutputStream out = new FileOutputStream(img);
int d = 0;
while ((d=in.read())!=-1){
out.write(d);
}
out.close();
in.close();
}
}
}
QQ复制图片
最新推荐文章于 2024-09-05 10:39:00 发布