Click here to Skip to main content
14,363,089 members
Rate this:
Please Sign up or sign in to vote.
Hi, could you please tell me how to delete multiple files with IFileOperation::DeleteItems? I'm not able to build IShellItemArray with file names. Thank you!
Posted

1 solution

Rate this:
Please Sign up or sign in to vote.

Solution 1

If you really want to do it with IFileOperation::DeleteItems, your options are listed in the documentation. Easiest in this case is probably SHCreateShellItemArrayFromIDLists. Get the ID Lists from ILCreateFromPath. Second choice would be SHCreateShellItemArrayFromDataObject where your data object contains a CF_HDROP. But it sounds like you aren't all that familiar with manipulating the shell namespace; you should familiarize yourself with that first. Shell items and item arrays and ID Lists are pretty fundamental.
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100