Using PowerShell, you can change the creation date of a file using the following command:

parameter is: public static void SetCreationTime (string path, DateTime creationTime);

[System.IO.File]::SetCreationTime(“C:\AFolder\Afile.pdf”, (Get-Date “19/12/2020 10:25:25”)

Using PowerShell, you can also change the last-modified date of a file:

[System.IO.File]::SetLastWriteTime(“C:\AFolder\Afile.pdf”, (Get-Date “19/12/2020”))

How to change date of a folder?

(Get-Item  "C:\AFolder").LastWriteTime = '01/01/2021 13:00:24'

21  Windows  
Total 0 Votes:
0

Tell us how can we improve this post?

+ = Verify Human or Spambot ?

Question ?

You will receive an email when your question will be answered.

+ = Verify Human or Spambot ?