Search code examples
c#.netwindowswinapifile-copying

How do i bring up the windows 8.1 "file copy dialogue box" (one with the pause/resume functionality) from my c# code while copying a file?


I found a similar question here "How to bring up the built-in File Copy dialog?" but was not able to understand if this is possible in windows 8.1.

I am trying to develop a console application where i just want to copy a file/folder from a source to destination. I want to give the user the ability to pause/resume or cancel the file download. For this i was looking to bring up the native windows 8.1 "file copy dialogue box" where we have the pause/resume functionality built in. How can i bring it up from my c# code?


Solution

  • IFileOperation is the interface that provides this functionality, but as it is a COM interface you need to use COM interop from C#.

    There's an article about it in MSDN magazine.