开发者

What are alternatives to the GetShortPathName function?

I'm looking for a function which can return the 'short' (8.3 notation) path for a given 'long' path. However, the GetShortPathName function (which seemed like a perfect fit) doesn't work for me since it requ开发者_如何学编程ires thata file with the given long path exists already.

What other options do I have for computing the 8.3 path for a given long path?


If the file does not exist, it does not have an 8.3 name. The 8.3 name is created when the file is created. You can of course get the 8.3 pathname for the directory it's in using GetShortPathName on the directory itself, if you need that.

Regardless, this is 2010. It's really backwards to be using 8.3 names for anything.


Try PathGetShortPath function.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜