HRESULT Value for Skipping File(s) in IFileOperationProgressSink::PreCopyItem method

0

I am trying to find a way to skip one or more files in a IFileOperation::CopyItem method where an entire folder is copied to a new destination.

The way I am attempting this (Plan A) is by testing for the file(s) in the FileOperationProgressSink::PreCopyItem method and, if there is a match, return a value such as COPYENGINE_E_USER_CANCELLED (0x80270000). Otherwise, return S_OK. Unfortunately passing COPYENGINE_E_USER_CANCELLED has the effect of cancelling the entire operation, not just the copy operation of the current file. Plan B would be to enumerate the files to be copied and test the files(s) before performing a copy operation but it seems cumbersome.

If Plan A seems feasible, I would appreciate it if you could share the HRESULT value that would allow me to skip the current file. The fact that the system copy function includes the option to skip one or more files in the event of a collision suggests that there is a way to do so but I am not sure.

Thank you.

winapi
com
asked on Stack Overflow Nov 9, 2020 by iPhilip

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0