<div dir="ltr">Hello,<div><br></div><div>I would like to get feedback on a write-up that I just finished. Next week I hope to figure out how to cross-post it to the Triembed page.</div><div><br></div><div>A DropBox glitch resulted in a rollback that reset all of my folder modification dates. I wrote a single-line script in Windows PowerShell to scan a target folder and set the date of every folder to the modification date of the newest file in the folder or sub-folder. The script could be a little shorter but I want it to work in PowerShell 1.0 since this version is installed by default on millions of Windows PC's. Here is the single-line.</div>
<div><br></div><div>Get-ChildItem "H:\DropBox\FolderDateFix\Test1" -recurse | Where-Object {$_.PsIsContainer} | ForEach-Object {$_.LastWriteTime = ($_ | Get-ChildItem -recurse | Where-Object {!$_.PsIsContainer} | Sort-Object LastWriteTime | Select-Object -last 1).LastWriteTime}<br>
</div><div><br></div><div><div>Here is my post where I walk through how the script works.</div><div><a href="http://fettricks.blogspot.com/2014/08/useful-folder-modification-dates-via.html">http://fettricks.blogspot.com/2014/08/useful-folder-modification-dates-via.html</a></div>
</div><div><br></div><div>Thanks,</div><div>Shane</div></div>