Here you can find the source of move(String input, String output)
Parameter | Description |
---|---|
String | output file |
public static void move(String input, String output) throws Exception
//package com.java2s; import java.io.*; public class Main { /**/*from w w w . j av a2s. c om*/ * This class moves an input file to output file * * @param String input file to move from * @param String output file * */ public static void move(String input, String output) throws Exception { File inputFile = new File(input); File outputFile = new File(output); try { inputFile.renameTo(outputFile); } catch (Exception ex) { throw new Exception("Can not mv" + input + " to " + output + ex.getMessage()); } } }