![]() The error from Get-ChildItem is not from the file system at all, as these are not wildcard characters. The third example shows a working example on how to "properly" locate the files.įigure 1: PowerShell Get-ChildItem examples.Īs an additional cross-check, we can easily check for the same files under a command prompt as shown below (Figure 2), confirming that the characters are perfectly allowable in a file name (in fact the minus sign is one of the more common filename delimiters around.)įigure 2: DOS cross-check to avoid the PowerShell fluffery.Ĭonversely, if you do try and use an actual file system-specific wildcard - I'm using the question mark in my example below (Figure 3), it simply won't feature in the resulting file name:įigure 3: The wildcard (question mark) is stripped out of the requested filename.The second example shows how to trigger the error you're talking about.The first Get-ChildItem is purely to show the filenames we're focusing on - one of which is your example filename of "abc-ghi.txt".RemoveFirstRowFormerHeaders = Table.A Windows file system perspective, those aren't wildcard characters, which is why they're allowable in a filename to begin with.įigure 1 below contains three example commandlets: PromoteHeaders = Table.PromoteHeaders(CombinedTables), Then, in the formula bar, replace this highlighted part, which is a list of the column name I'm replacing ("Column1") and the name I'm replacing it with ("Test"). Then, working in Table1, I can double-click the first column title and rename it anything-I'll type Test: ![]() ![]() ![]() If I start with this as my table with the columns that I want to rename-I'll call it Table1:Īnd this as my table with the list of new column names I want to use-I'll call this table NewColumnNames: ![]() This doesn't use a loop or an index but I believe it solves your real concern. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |