Java Rename File renameFolder(String destinationFolderPath, String zipFileName, String prefix)

Here you can find the source of renameFolder(String destinationFolderPath, String zipFileName, String prefix)

Description

rename Folder

License

Apache License

Declaration

public static void renameFolder(String destinationFolderPath, String zipFileName, String prefix) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import java.io.File;

public class Main {
    public static void renameFolder(String destinationFolderPath, String zipFileName, String prefix) {
        File folder = new File(destinationFolderPath + File.separator + zipFileName);
        File managerFolder = new File(destinationFolderPath + File.separator + prefix + zipFileName);
        if (folder.exists()) {
            folder.renameTo(managerFolder);
        } else {//  w  w  w  .  jav  a 2s .  c  o  m
            System.out.println(zipFileName + " Folder not found..!!");
        }
    }
}

Related

  1. renameFileHard(File srcFile, File destFile)
  2. renameFileIfExists(File f)
  3. renameFileOnWindows(File oldFile, File newFile)
  4. renameFiles(File fileDirectory, String regex, String replacement)
  5. renameFiles(String rootDir, String sourcePostfix, String destPostfix)
  6. renameLocal(String oldPath, String newPath)
  7. renameOldFile(final String fileName)
  8. renameOverwrite(String oldname, String newname)
  9. renameSuffix(File f, String suffix)