Hi @~OSD~ , You can use a combination of a try-catch block and ignoring the caught exception.
Try
My.Computer.FileSystem.CopyDirectory(Source, Destination, overwrite:=True)
Catch ex As Exception
' Ignore the exception and continue execution
End Try
It merely suppresses any exceptions that occur during the operation, allowing the program to continue execution without being interrupted by error messages.
However, it's essential to note that by ignoring exceptions, you lose the ability to detect and handle potential issues that may arise during the copy operation. If an error occurs that prevents certain files or directories from being copied successfully, you won't be aware of it, and the operation will continue as if everything succeeded.
Best Regards.
Jiachen Li
If the answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.