public static boolean renameFile(final String fromFilename,final String toFilename){
  return renameFile(new File(fromFilename),new File(toFilename));
}

public static boolean renameFile ( final String fromFilename , final String toFilename ) { return renameFile ( new File ( fromFilename ) , new File ( toFilename ) ) ; }
attempts to rename a file . the built - in method file . renameto ( ) often fails for different reasons ( e . g . if the file should be moved across different file systems ) . this method first tries the method file . renameto ( ) , but tries other possibilities if the first one fails .
