
import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.InputStreamReader;
import java.io.PrintStream;

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 *
 * @author LH
 */
public class Filecopy
{
        public static void main(String[] args) throws Exception //unfein; amchs nur wegen ihrer doofen limitierung
    {
        
        //System.out.println("dbg1");
        BufferedReader kb = new BufferedReader(new InputStreamReader(System.in));
        
        
        //System.out.println("dbg2");
        
        //System.out.print()
        System.out.print("Bitte Quelldateinamen eingeben:");
        String line = kb.readLine();
        while(line!=null)
        {
            BufferedReader fi = new BufferedReader(new InputStreamReader(new FileInputStream(new File(line))));
            System.out.print("Bitte Zieldateinamen eingeben:");
            line = kb.readLine();
            PrintStream fo = new PrintStream(new FileOutputStream(new File(line)));
            String line2 = fi.readLine();
            while(line2!=null)
            {
                fo.println(line2);
                line2 = fi.readLine();
            }
            
            
            
            
            
            System.out.print("Bitte Quelldateinamen eingeben:");
            line = kb.readLine();
        }
    }
}
