0

function touch {
  Param(
    [Parameter(Mandatory=$true)]
    [string]$Path
  )
   if (Test-Path -LiteralPath $Path) {
    (Get-Item -Path $Path).LastWriteTime = Get-Date
  } else {
    New-Item -Type File -Path $Path
  }
}

Jagdish Sarma Asked question January 11, 2021
Add a Comment