Changing File/Folder Creation Date

by Jun 7, 2010

You should use this approach if you need to change the creation time of a folder or file after you have created it:

Get-Childitem c:\testfolder |
Foreach-Object { $_.CreationTime = ‘1/1/1972 10:35’ }

It will change creation time of c:\testfolder to the date and time specified. Note that the date-time format used here needs to match your local date-time format. A more general approach would be to use Get-Date with its parameters to construct a culture-neutral date and assign that to the file/folder CreationDate property.

Twitter This Tip! ReTweet this Tip!