Click here to Skip to main content
15,889,216 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
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

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.
 
Share this answer
 

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900