Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

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!

attached code not moving file.

ora_1978Jan 20 2016 — edited Jan 20 2016

Please let me know the reason to not move file from src to dest folder.

//import java.io.*;

public class test {

       public static void main(String args[]) {

            try {

            //Runtime.getRuntime().exec("cmd /c move D://src//1.txt D://dest");

            @SuppressWarnings("unused")

  Process process = Runtime.getRuntime().exec("cmd /c move D://src//1.txt D://dest");

            } catch(Exception e) {

                System.out.println(e.toString());

                e.printStackTrace();

            }

        }

}

vinodh

Comments
Post Details
Added on Jan 20 2016
0 comments
508 views