Here is the error I get:
Code:
Error 1
Overload resolution failed because no accessible 'Where' can be called with these arguments:
Extension method 'Public Function Where(predicate As System.Func(Of String, Integer, Boolean)) As System.Collections.Generic.IEnumerable(Of String)' defined in 'System.Linq.Enumerable': Nested function does not have the same signature as delegate 'System.Func(Of String, Integer, Boolean)'.
Extension method 'Public Function Where(predicate As System.Func(Of String, Boolean)) As System.Collections.Generic.IEnumerable(Of String)' defined in 'System.Linq.Enumerable': Lambda parameter 'LOCAL' hides a variable in an enclosing block, a previously defined range variable, or an implicitly declared variable in a query expression. D:\Minha Pasta\Instalações\Visual Basic\MOVIES v3\WindowsApplication1\SRTScanner.vb 9 25 WindowsApplication1
Using this code:
'vb' Code:
Dim LOCAL = "F:\Family"
Dim folderPathToExclude = "F:\Family\Pictures"
Dim filePaths = Directory.GetFiles(LOCAL, "*.srt", SearchOption.AllDirectories).Where(Function(LOCAL) Path.GetDirectorName(LOCAL) <> folderPathToExclude).ToArray()
Is it possible to exclude more than one folder?