In a DOS window, how can I get the full DOS name/short name of the directory I am in?
For example, if I am in the directory C:\Program Files\Java\jdk1.6.0_22
, I want to display it's short name C:\PROGRA~1\Java\JDK16~1.0_2
.
I know running dir /x
will give me the short names of files/directories in the current directory but I haven't been able to find a way to display the full path of the current directory in short name format. I'm having to work my way through the path from the root, directory by directory, running dir /x
in each.
I'm sure there is an easier way to do this?
run
cmd.exe
and do the following:Then command.com will come up and display only short paths.
source
A someone more direct answer is to fix the bug.
%SPARK_HOME%\bin\spark-class2.cmd; Line 54
Broken: set RUNNER="%JAVA_HOME%\bin\java"
Windows Style: set "RUNNER=%JAVA_HOME%\bin\java"
Otherwise, the RUNNER ends up with quotes, and the command
"%RUNNER%" -Xmx128m ...
ends up with double-quotes. The result is that the Program and File are treated as separate parameters.