Hello
I am using the code below to read and display that contents of a directory to a list box. It works great except it displays a file which I can't see or erase using Windows explorer. The file is called "thumbs.db" and I know it got in the directory when copying from a thumb drive. It is not just a hidden file because I have those also and know how to view and erase standard hidden files.
Does anyone know how to either erase this file or stop the VB.net code from displaying this type of file?
PrivateSub GetDirectoryContents()
Dim dDir AsNew DirectoryInfo(sDir)
Dim fFileSystemInfo As FileSystemInfo
ForEach fFileSystemInfo In dDir.GetFileSystemInfos()
Me.xFilesListBox.Items.Add(fFileSystemInfo.Name)
Next
EndSub
Thanks
I am using the code below to read and display that contents of a directory to a list box. It works great except it displays a file which I can't see or erase using Windows explorer. The file is called "thumbs.db" and I know it got in the directory when copying from a thumb drive. It is not just a hidden file because I have those also and know how to view and erase standard hidden files.
Does anyone know how to either erase this file or stop the VB.net code from displaying this type of file?
PrivateSub GetDirectoryContents()
Dim dDir AsNew DirectoryInfo(sDir)
Dim fFileSystemInfo As FileSystemInfo
ForEach fFileSystemInfo In dDir.GetFileSystemInfos()
Me.xFilesListBox.Items.Add(fFileSystemInfo.Name)
Next
EndSub
Thanks