touch Command in PowerShell
By: Cam Wohlfeil
Published: 2018-02-07 0000 EST
Category: Solutions
Tags:
powershell
Unix/Linux has a very convenient command for making an empty file at the specified path called touch. PowerShell can imitate this by using New-Item.
New-Item -ItemType file <filename>
# Example: creating the PowerShell profile. -Force is required to make the full path.
New-Item -ItemType file $profile -Force
New-Item can also be used to make an empty directory by changing -ItemType to directory.
More Info: