I want to programmatically ask explorer to refresh MTP folder contents (Android device) and display the existing files (simulating F5 on the folder). if it was a standard path with drive letter, I can refresh using:
SHChangeNotify(SHCNE_UPDATEDIR, SHCNF_PATH, FolderPath, NULL);
However, MTP folder doesn't have a drive letter path that I can use. how can I ask explorer to refresh such folder, or alternatively ask explorer to refresh all open folder windows?
Here is some sample code that scans all opened Windows Explorer views and refresh all views that currently display a portable device Shell Item (using WPD properties), you can adapt it to filter the exact view(s) you want to target: