On my TCL Android TV, the USB files are displayed on screen in reverse chronological order based on the file creation date, by default. To order by file name, I have to explicitly go to the menu and select it every time. This is really inconvenient. What's worse - the TV can only sort the file names as a string without considering numeric parts of the string - e.g. file 2.* will appear before 11.*.
So for me to watch TV series or training videos, I 'd have to manually look for the next file to watch. This is not smart at all.
To get around the problem I recursively updated all my files' creation date to reversely align with their file names (with consideration of the numerical part of the file name).
$filepath="E:\1_TV\Show\[romen.com] - Block & Chain - A Complete Introduction"
ls -literalPath $filepath -Recurse | Sort-Object -descending { [regex]::Replace($_.Name, '\d+', { $args[0].Value.PadLeft(20) }) } | forEach-Object {
Write-Host "processing file" $_
$_.CreationTime = Get-Date
$_.LastWriteTime = Get-Date
sleep 1
}
No comments:
Post a Comment