Selecting file in Windows Explorers does not always work

后端 未结 1 1666
不知归路
不知归路 2021-02-08 12:52

Using the following

explorer.exe /select, \"c:\\path\\to\\file.txt\"

I can open Windows Explorer and select the file. In Delphi I do this to se

1条回答
  •  情书的邮戳
    2021-02-08 13:25

    This is a known limitation of using the /select switch with explorer.exe, it will only select the specific file if the parent folder is not already open.

    You'll have to use an API call like SHOpenFolderAndSelectItems in stead. This function also allows for multiselect.

    0 讨论(0)
提交回复
热议问题