hi
i've seen a few posts to this problem but didn't find a solution.
i want to open a document. it works fine if the path ist 8.3 format
compatible.
however, the example below does not work.
Runtime.getRuntime().exec("cmd.exe /c start c:\\temp\\long
filename.csv");
if i use the 8.3 dos format path it works.
Runtime.getRuntime().exec("cmd.exe /c start c:\\temp\\LONGFI~1.CSV");
how do i get the 8.3 format path in JAVA?
or is there another solution to open the file, without using the 8.3
format.
thanks a lot for your support.
greetings
yves
Roland de Ruiter - 15 Jun 2006 11:39 GMT
> hi
>
[quoted text clipped - 19 lines]
> greetings
> yves
Enclose the long filename in quotes. However, when the start command
sees a parameter with qoutes, it takes it as the title of the command
window (at least on WinXP). So you have to specify a (dummy) window
title as well:
...exec("cmd.exe /c start \"winttl\" \"c:\\temp\\long filename.csv\"");

Signature
Regards,
Roland