PowerTip: Use PowerShell to Create New File

Summary: Create a new file with Windows PowerShell.

Hey, Scripting Guy! Question How can I use Windows PowerShell to create a new text file that will be empty until I add content?

Hey, Scripting Guy! Answer Use the New-Item cmdlet and specify a path, name, and type, for example:

New-Item c:\fso\AnEmptyFile.txt -ItemType file

Comments (0)

Skip to main content