import java.io.*; public class CopyMultipleFiles{ public static void main(String[] args)throws IOException { BufferedReader bf = new BufferedReader(new InputStreamReader(System.in)); System.out.println("Enter Number of files that have to be coppied:"); int n = Integer.parseInt(bf.readLine()); String fileName[] = new String[n]; for (int i=0; i 0){ out.write(buf, 0, len); } in.close(); out.close(); } catch(FileNotFoundException ex){ System.out.println(ex.getMessage() + " in the specified directory."); System.exit(0); } catch(IOException e){ System.out.println(e.getMessage()); } } }