import java.io.*;
class FileInDemo
{
public static void main(String as[]) throws Exception
{
File f=new File("F:/Images/"); //Directory Folder
int a;
File fa[]=f.listFiles();
for( File faa: fa) //Enhanced For Loop
{
FileInputStream fis=new FileInputStream(faa.getPath());
FileOutputStream fos=new FileOutputStream(faa.getName());
while((a=fis.read())!=-1)
{
fos.write(a);
}
}
}
}
class FileInDemo
{
public static void main(String as[]) throws Exception
{
File f=new File("F:/Images/"); //Directory Folder
int a;
File fa[]=f.listFiles();
for( File faa: fa) //Enhanced For Loop
{
FileInputStream fis=new FileInputStream(faa.getPath());
FileOutputStream fos=new FileOutputStream(faa.getName());
while((a=fis.read())!=-1)
{
fos.write(a);
}
}
}
}
No comments:
Post a Comment
Hello Friends...! Lets share Your Views,Ideas,Comments here....!!