Hi Guys:

  I try to run a program like the following. Basically i want to copy a file from one 
directory/file to another file/directory. Here goes the code.

public class T {
public static void main(String []args) {
        try {
                Runtime.getRuntime().exec("copy testtrial.txt a.txt");
        } catch (Exception e) { e.printStackTrace();}
}

}

I get the following exceptions. Can any of you explain me about this.

java.io.IOException: CreateProcess: copy testtrial.txt a.txt  error=2
        at java.lang.Win32Process.create(Native Method)
        at java.lang.Win32Process.<init>(Win32Process.java:64)
        at java.lang.Runtime.execInternal(Native Method)
        at java.lang.Runtime.exec(Runtime.java:272)
        at java.lang.Runtime.exec(Runtime.java:195)
        at java.lang.Runtime.exec(Runtime.java:152)
        at T.main(T.java:4)

Thanks in advance
Bansi


Send FREE Greetings for Father's Day--or any day!
Click here: http://www.whowhere.lycos.com/redirects/fathers_day.rdct

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to