I am interested in executing the cmd.exe move
command from a Java application.
I know how to invoke external processes from within Java. There are 100's of questions on this point in StackOverflow. What I can't figure out, is what the command line should look like.
For example, in a DOS window, this is the command I type:
move dirA dirB
and the directory dirA
is moved to directory dirB
. Exactly what I want done. For reasons that require far too much context, and will detract from the question, a pure java solution is not an option in the specific context I am concerned with. (Oh the joys of operating in an enormous and complex legacy systems!)
What is the external system command I invoke from java to do that? It seems like it should just be:
"cmd move dirA dirB"
However, that fails for me. I am familiar with this question, but it does not directly answer my question.