shell.SHCreateItemInKnownFolder

PyIShellItem = SHCreateItemInKnownFolder(FolderId, Flags , Name , riid )

Creates a Shell item object for a single file that exists inside a known folder.

Parameters

FolderId : PyIID

The GUID of a known folder (shell.FOLDERID_*)

Flags : int

Combination of shellcon.KF_FLAG_* flags controlling how folder is handled

Name : str

Name of an item in the folder. Pass None to bind to the known folder itself.

riid=IID_IShellItem : PyIID

The interface to return, usually IID_IShellItem or IID_IShellItem2

Comments

This function is only available on Vista and later; a COM exception with E_NOTIMPL will be thrown if the function can't be located.