Question overwrite while using "UIOption.AllDialogs" when copying?

Mugsy

Member
Joined
Sep 30, 2020
Messages
7
Programming Experience
10+
I have a program that checks for a Backup folder when it starts, and if not found, prompts for you to create one.

The copy process can take a long time, so I use the standard Windows copy dialog to show your progress:

My.Computer.FileSystem.CopyDirectory(strSrcPath, Path.GetDirectoryName(strBackupPath), UIOption.AllDialogs)

This works fine unless the destination folder already exists. Then the Copy dialog stops and prompts you on whether to Overwrite every. single. file. :eek:

There's no checkbox to "Overwrite All" on the dialog, and no way to include a switch to set Overwrite to True when using "UIOption.AllDialogs" (only 3 overloads.)

Is there a way around this? TIA
 
Top Bottom