I used a slightly modified version of Mjolinor answer to solve the problem with the incorrect date in the files that were just loaded from a remote source. I changed the code to make it more intuitive to understand, if I have to go back in the future (short changed hands on the full names of the teams).
# Correct Access/Create/Write times on transferred files ForEach( $File in $TransferList ) { @("CreationTime","LastAccessTime","LastWriteTime") | ForEach { $(Get-Item $File.Name).$_ = $File.Date } } ", "LastWriteTime") | # Correct Access/Create/Write times on transferred files ForEach( $File in $TransferList ) { @("CreationTime","LastAccessTime","LastWriteTime") | ForEach { $(Get-Item $File.Name).$_ = $File.Date } } . $ _ = $ File.Date # Correct Access/Create/Write times on transferred files ForEach( $File in $TransferList ) { @("CreationTime","LastAccessTime","LastWriteTime") | ForEach { $(Get-Item $File.Name).$_ = $File.Date } }
Aerox source share