RE:Copiar archivos
Publicado por
Rulo (1 intervención) el 03/08/2004 16:20:53
File inputFile = new File("C:\\fruitshop.txt");
File outputFile = new File("C:\\fruitshopClone.txt");
FileReader in = null;
try {
in = new FileReader(inputFile);
}
catch (FileNotFoundException ex) {
}
FileWriter out = null;
try {
out = new FileWriter(outputFile);
}
catch (IOException ex1) {
}
int c;
try {
while ( (c = in.read()) != -1) {
out.write(c);
}
}
catch (IOException ex2) {
}
try {
in.close();
}
catch (IOException ex3) {
}
try {
out.close();
}
catch (IOException ex4) {
}