Java File Move nui mover(String file, String caminhoNovo)

Here you can find the source of mover(String file, String caminhoNovo)

Description

mover

License

Open Source License

Declaration

public static void mover(String file, String caminhoNovo) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.io.File;

import java.nio.file.Files;

public class Main {
    public static void mover(String file, String caminhoNovo) {

        File arquivo = new File(file);
        File caminhoNovoFile = new File(caminhoNovo + arquivo);

        try {/* w  w w . j  a  va 2s.c  o m*/
            Files.move(arquivo.toPath(), caminhoNovoFile.toPath());
        } catch (Exception e) {
            // 
        }
    }
}

Related

  1. moveFile(File src, File dest)
  2. moveFile(final File srcFile, final File destFile)
  3. moveFile(String source, String target)
  4. moveFile(String sourceFile, String destFile)
  5. moveFiles(File src, String newSrc, File dest)