Hi All,
I have the following code that simple pulls in the attributes of the files within the folders. I'm doing this so I can read a large number of folders and return their sizes and file sizes etc. The problem I have is that people have saved files with very long file names and so when Power Query tries to read them it returns an error for the particular file. That's not a problem as an Error Query is created and I can correct the files.
My problem is that when analysing a lot of folders it stops at a file that causes an error. I'm at a loss as to how to solve it, but was thinking some kind of IF statement.
Any ideas would be appreciated. I have only just started using Power Query, having moved from using solely VBA.
let
Source = Folder.Files("C:\\MyDocs\Folder1\Folder2"),
#"Expanded Attributes" = Table.ExpandRecordColumn(Source, "Attributes", {"Kind", "Size"}, {"Attributes.Kind", "Attributes.Size"})
in
#"Expanded Attributes"
I have the following code that simple pulls in the attributes of the files within the folders. I'm doing this so I can read a large number of folders and return their sizes and file sizes etc. The problem I have is that people have saved files with very long file names and so when Power Query tries to read them it returns an error for the particular file. That's not a problem as an Error Query is created and I can correct the files.
My problem is that when analysing a lot of folders it stops at a file that causes an error. I'm at a loss as to how to solve it, but was thinking some kind of IF statement.
Any ideas would be appreciated. I have only just started using Power Query, having moved from using solely VBA.
let
Source = Folder.Files("C:\\MyDocs\Folder1\Folder2"),
#"Expanded Attributes" = Table.ExpandRecordColumn(Source, "Attributes", {"Kind", "Size"}, {"Attributes.Kind", "Attributes.Size"})
in
#"Expanded Attributes"