Java Rename File reName(String oldName, String newName)

Here you can find the source of reName(String oldName, String newName)

Description

re Name

License

Open Source License

Declaration

public static void reName(String oldName, String newName) 

Method Source Code

//package com.java2s;

import java.io.File;

public class Main {

    public static void reName(String oldName, String newName) {
        File oldF = new File(oldName);
        File newF = new File(newName);
        boolean renameTo = oldF.renameTo(newF);
        if (!renameTo) {
            return;
        }/* ww  w.  j ava  2  s. co m*/
    }
}

Related

  1. rename(final String src, final String dst)
  2. rename(String existingFile, String newFilename)
  3. rename(String fileName, String distFile)
  4. rename(String from, String to)
  5. rename(String oldFile, String newFile)
  6. rename(String oldName, String newName)
  7. rename(String platformLibPath, String newPath)
  8. reName(String s, String s1)
  9. rename(String srcFilename, String destFilename)