Usecase:
There are ~4000 files that have lost any relation to the date they were created, and as a result the order totally mixed up.
After copying the entire directory to Windows i saw what the problem is: Android doesn't store the creation timestamp of a file, and sorts only by Last Modification time of the file. Whereas the "Modification Time" was the "broken" attribute which caused all my files to get out of their order:
From here i know how to proceed - just copy the "Date" attribute into the "Date Modified" for every single file, and i would do it with the following code:
$picts = Get-ChildItem -force | Where-Object {! $_.PSIsContainer}
foreach($object in $picts)
{
$object.LastWriteTime=($object.Date)
}
The problem is that $object.Date
is a wrong argument, because Date
doesn't seem to represent the "Date" attribute of the file in Powershell.
Does anybody know what is the right ChildItem
to represent the "Date" or/and "Date taken" attributes?