
05/03/2012, 07:32
|
 | | | Fecha de Ingreso: agosto-2008 Ubicación: En internet
Mensajes: 2.511
Antigüedad: 16 años, 5 meses Puntos: 188 | |
Respuesta: moveTo y delete Pues has de revisar eso porque en un servlet debería funcionar perfectamente. Igual no está pillando el archivo a partir de la ruta correcta...
File fichero = new File("rutaRelativaDeTuArchivo"); // Archivo a renombrar
File ficheroRenombrado = new File("rutaRelativaDeTuArchivoRenombrado");
boolean renombrado = fichero.renameTo(ficheroRenombrado);
if (renombrado) {
system.out.println("El fichero se ha renombrado");
} else {
system.out.println("El fichero no se ha renombrado");
}
__________________ if (fuzzy && smooth) {
fuzzylog = "c00l";
return true;
} |