Ștefan-Mihai MOGA
Ștefan-Mihai MOGA

Reputation: 343

How to create an IShellItemArray from a list of file names

Could you please tell me how to delete multiple files with IFileOperation::DeleteItems?

I'm not able to build IShellItemArray with file names.

Upvotes: 2

Views: 2718

Answers (2)

faatihi
faatihi

Reputation: 11

I got around this same problem. I created a variable (to hold all my IShellItems) of type vector and converted each filename ( also of a vector) using a for loop into an IShellItem object and kept them in the IShellItem container. Then I loop through this IShellItem container, supplying each item to CopyItem(). After the loop, I then called PerformOpeations().

Upvotes: 1

parapura rajkumar
parapura rajkumar

Reputation: 24403

You can use SHCreateShellItemArrayFromIDLists

Upvotes: 4

Related Questions