Avatar of linuxrox
linuxrox
Flag for United States of America

asked on 

VB.NET copy entire folder and subfolders to destination and ignore thumbs.db

Hello.  Currently here is the code I use to copy an entire folder:

Microsoft.VisualBasic.FileIO.FileSystem.CopyDirectory("\\share\folder", "\\destshare\folder", True)

Open in new window


The issue I'm having is a file like "thumbs.db" when trying to be copied results in an error:

"Error is could not complete operation on some files and directories.  see the data property of the exception for more details."

is there any method to copy an entire folder and it's contents and ignore certain file types?  Much appreciated if someone can show me a solution for such a thing.

thank you very much.
Visual Basic.NET.NET Programming

Avatar of undefined
Last Comment
linuxrox

8/22/2022 - Mon