Created
September 18, 2017 19:45
-
-
Save atbradley/d76a7326bf5c5f77f8d2b8d3b28100b9 to your computer and use it in GitHub Desktop.
Powershell equivalent of POSIX 'touch' command.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
param([string] $fn) | |
if(!(New-Item $fn -ErrorAction SilentlyContinue)) { | |
Set-ItemProperty -Path $fn -Name LastWriteTime -Value (get-date) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment