Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Runtime.exce() not working properly

807605Oct 5 2007 — edited Oct 5 2007
Hi

I am using runtime.exce() to copy some files from a location to another but sometimes it is not working.

String parameter5 = "cmd /c copy R:\\" + view + "\\" + vob
+ "\\Product\\releases\\deploy\\*.* "
+ System.getProperty("user.dir") + File.separator
+ "Modules";
System.out.println(parameter5);
p = runtime.exec(parameter5);


finally the System.out.println prints the command as

cmd /c copy R:\t02948_test\JavaProg_cvob\Product\releases\deploy\*.* C:\Production\Modules

Is there any otherway to confirm whether the command runs successfully or not.
Thanks in advance.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 2 2007
Added on Oct 5 2007
3 comments
27 views