how to make a copy-paste script with jcreator?
<p>can u help me with the coding of java, so i can copy a single file using command prompt.</p>

<p>so, i wanna run the java file from command prompt of windows, like "java "my java script" "my file target"" and make a copy of my "my file target" at the same directory without replace the old one.</p>

<p>please help me?</p>

<p>i came out with this</p>

<pre><code>import java.io.*;
class ReadWrite {
    public static void main(String args[]) throws IOException {
     FileInputStream fis = new FileInputStream(args[0]);
     FileOutputStream fos = new FileOutputStream("output.txt");
     int n;
     if(args.length != 1)
      throw (new RuntimeException("Usage : java ReadWrite &lt;filetoread&gt; &lt;filetowrite&gt;"));
     while((n=fis.read()) &gt;= 0)
      fos.write(n);
    }
}
</code></pre>

<p>but the copy of the file is named as output.txt
can u guys help me with the coding, if i wanna choose my own output name?
if i type "java ReadWrite input.txt (this is the output name that i want)" on command prompt</p>

<p>really need help here...</p>
