Have a look at this article:
When Runtime.exec() won't One reason why you can't run some commands, like "dir" and "copy" directly using Runtime.exec(), is because those commands are not really executables - there is no "dir.exe" or "copy.exe" on your computer. Those commands are built-in into the command prompt window, so you can't start them as if they are programs on the system.