Run Get-ChildItem -Path . -Filter '*.sql'
on folders with two files: 001.sql_bk
and 010.sql
, and the output is as below. File 001.sql_bk
is not expected in output.
...
Mode LastWriteTime Length Name
---- ------------- ------ ----
-a---- 2023/02/09 11:09 141 001.sql_bk
-a---- 2023/02/09 11:14 187 010.sql
The Version of Windows PowerShell is:
Name Value
---- -----
PSVersion 5.1.19041.2364
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.19041.2364
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
On PowerShell 7.3, the output is as expected:
Mode LastWriteTime Length Name
---- ------------- ------ ----
-a--- 2023/02/09 11:14 187 010.sql