-
Notifications
You must be signed in to change notification settings - Fork 0
FileSystem
neztach edited this page Aug 31, 2023
·
1 revision
| Code | Explanation |
New-Item -Path c:\test -ItemType Directory |
Create a directory |
mkdir -Path c:\test2 |
Create a directory (short-hand) |
New-Item -Path c:\test\myrecipes.txt |
Create an empty file |
Set-Content -Path c:\test.txt -Value '' |
Create an empty file |
[System.IO.File]::WriteAllText('testing.txt', '') |
Create an empty file using .NET Base Class Library |
Remove-Item -Path testing.txt |
Delete a file |
[System.IO.File]::Delete('testing.txt') |
Delete a file using .NET Base Class Library |
neztach - PowerShell Public repo