function SHAddToRecentDocs seems not working on win10 for folders

Steins 41 Reputation points
2022-12-04T15:10:50.53+00:00

It works well with files, but when i tried add a folder to my Frequent Folder list using SHAddToRecentDocs,
In 'C:\Users\xxx\AppData\Roaming\Microsoft\Windows\Recent', i did find it, but it will not show in file explorer frequent folder list.
I've checked the nf-shlobj_core-shaddtorecentdocs docs, since it says:

'Folders are also accepted by SHAddToRecentDocs, but appear only in the Jump List for the Windows Explorer taskbar button. Folders do not appear in any other application's Jump List.'

Supposed to show in the frequent list, but not.

Am i understood it wrong or there's other things i should do to make it work?

Windows development | Windows API - Win32
Developer technologies | C#
{count} votes

1 answer

Sort by: Most helpful
  1. Castorix31 90,686 Reputation points
    2022-12-05T08:43:07.4+00:00

    Folders are added with "pintohome" command :

    For example :

                using (Process p = new Process())  
                {  
                    p.StartInfo.FileName = "E:\\toto";  
                    p.StartInfo.Verb = "pintohome";                     
                    p.Start();  
                }  
    

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.