linux sort by date code example
Example: get date from file name that has date and time in reverse order
Get-ChildItem \\server\folder -Filter Examplefile*.txt |
Sort-Object { $_.BaseName -replace '.+(\d{2})(\d{2})(\d{2})', '$3$1$2' }
Get-ChildItem \\server\folder -Filter Examplefile*.txt |
Sort-Object { $_.BaseName -replace '.+(\d{2})(\d{2})(\d{2})', '$3$1$2' }