Skip to content

Instantly share code, notes, and snippets.

@yuiseki
Created June 17, 2021 23:59
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yuiseki/b17a6cf95851cbd8ad2c68c980263225 to your computer and use it in GitHub Desktop.
Save yuiseki/b17a6cf95851cbd8ad2c68c980263225 to your computer and use it in GitHub Desktop.
Param($srcFile,$destFile)
Write-Host $srcFile
Write-Host $destFile
$srcProperty = Get-ItemProperty $srcFile
$srcctime = $srcProperty.CreationTime
$srcmtime = $srcProperty.LastWriteTime
Write-Host $srcctime
Write-Host $srcmtime
Set-Itemproperty $destFile -name CreationTime -value $srcctime
Set-Itemproperty $destFile -name LastWriteTime -value $srcmtime
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment