Here you can find the source of renameFile(String src_pathname, String dest_pathname)
public static boolean renameFile(String src_pathname, String dest_pathname)
//package com.java2s; //License from project: Open Source License import java.io.File; public class Main { public static boolean renameFile(String src_pathname, String dest_pathname) { File src_file = new File(src_pathname); return src_file.renameTo(new File(dest_pathname)); }/*w ww . j a va 2s .c o m*/ }