Tiberiu
Tiberiu

Reputation: 3010

java, convert windows path to dos 8.3 format

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

Upvotes: 2

Views: 2576

Answers (3)

ax.
ax.

Reputation: 59927

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.

Upvotes: 2

igustin
igustin

Reputation: 1118

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

Upvotes: 1

Asaph
Asaph

Reputation: 162801

Try this

Upvotes: 3

Related Questions