Password: Forgot?
How to change the last modified time on a folder or file in Windows 10
Never change your avatar
Posts: 2935
Status: Offline
Group: Admin
Member: #1
Every once in a while, a program will change the "last modified" date of a folder or file when you didn't want that to happen. (Microsoft Office often does this.)

If you want to change the date of a folder or file, you can use the following Microsoft PowerShell script:

$d = [system.io.directoryinfo]"C:\Stuff" $d.LastWriteTime = "8/1/2020 6:14 PM"

I'm sharing this in case someone (perhaps myself!) finds this useful.
Edited by: Bibby , Aug 1st, 2020 @ 10:24 pm
Course clear! You got a card.
^ Top
Posts: 1550
Status: Offline
Group: Member
Member: #52
A handy command indeed. Especially if you didn't actually modify something.

^ Top
Users Viewing This Topic
Lithosphere skin 1.0.0 © 2009-10 Matt