Forum Stats

  • 3,733,037 Users
  • 2,246,686 Discussions
  • 7,856,490 Comments

Discussions

attached code not moving file.

ora_1978
ora_1978 Member Posts: 481

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

Sign In or Register to comment.