Darcara
Darcara

Reputation: 1608

Get alternative filename in windows

I'm running my program on windows that will enumerate the files in a directory and pass it on to some other library that processes the files. While my program does support unicode, the library doesn't, so I have to convert the unicode file path and name to ANSI. That works just fine, as long as there are no unicode characters in that filename.

I know that every file and directory in windows is accessible through it's 8.3 name, but I don't know how to get that name through the windows api.

Upvotes: 1

Views: 1438

Answers (1)

Anders
Anders

Reputation: 101569

GetShortPathName()

It should be noted that shortname generation can be turned off (fsutil)

Upvotes: 5

Related Questions