【问题标题】:How to Retrieve Name of .lnk (short cut) file如何检索 .lnk(快捷方式)文件的名称
【发布时间】:2015-02-20 05:58:38
【问题描述】:

嘿,有人知道如何从文件路径中获取快捷方式文件(.lnk)的名称吗?

例如,如果快捷方式位于以下位置...

"C:\Users\%USERNAME%\AppData\Roaming\Microsoft\Internet Explorer\Quick Launch\User Pinned\StartMenu\Internet Explorer.lnk"

我只想要在 name 下的文件属性中看到的 Internet Explorer 部分。

【问题讨论】:

    标签: c# path filenames shortcut


    【解决方案1】:

    var name = Path.GetFileNameWithoutExtension(<filepath>); 应该会给你你想要的东西。

    【讨论】:

    • 我认为他关注的是链接链接到的路径,而不是链接文件本身的名称。
    猜你喜欢
    • 2013-08-04
    • 2012-05-07
    • 2021-09-27
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2010-09-25
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多