File Operations
Create
-
Single file
New-Item -Path . -Name "my_file.txt" -ItemType "file" -Value "lorem ipsum" -
Directory
New-Item -Path ../ -Name "my_directory" -ItemType "directory"Omit
-Nameand use a relative path, e.g.path/to/my_new_dirinstead for a quicker operation, result in a directory namedmy_new_dir.
Delete
TBA
Copy
Robocopy
TBA
File Info
No native equivalent to Linux
file.
File Content
- With Powershell
Get-Content file.txt
- With Command Prompt (pipe into
MOREfor scrolling)
TYPE file.txt | MORE