tags:

views:

394

answers:

3

anyone knows any java utility method that would convert windows paths to DOS 8.3 format ? thanks

+2  A: 

Try this

Asaph
I found this prior of posting, I thought that there might be an easier way
Tiberiu Hajas
A: 

AFAIK, there is no "method" for such "conversion". Only you can do is retrieve from filesytem 8.3 filename variant (if exists in filesystem).

igustin
+1  A: 

you could also use the GPL-licensed Servertec Foundation Classes (SFC), which have a stec.sfc.Win32.File::getShortPathName().

in the end, parsing the output of dir /X might be the easiest solution.

ax