•Arnošt Havelka
Create Files in PowerShell
Learn to create new files with New-Item.
Start Interactive LessonThe New-Item command creates new files and directories. Master this essential skill for file management.
Creating Files
Try the command
Create a new file!
Build the command
New-Item -Path [filename] -ItemType File
-ItemType FileCreate a file
-ItemType DirectoryCreate a directory
Terminal
C:\Users\User>New-Item -Path [filename] -ItemType File
File Creation Examples
Command Prompt
documents.txt
C:\Users\User>ls
Knowledge Check
1 / 1What flag creates a file?
References
These documentation links provide authoritative details for the commands used in this article.