- PowerShell Tutorial
- PowerShell - Home
- PowerShell - Overview
- PowerShell - Environment Setup
- PowerShell - Cmdlets
- PowerShell - Files and Folders
- PowerShell - Dates and Timers
- PowerShell - Files I/O
- PowerShell - Advanced Cmdlets
- PowerShell - Scripting
- PowerShell - Special Variables
- PowerShell - Operators
- PowerShell - Looping
- PowerShell - Conditions
- PowerShell - Array
- PowerShell - Hashtables
- PowerShell - Regex
- PowerShell - Backtick
- PowerShell - Brackets
- PowerShell - Alias
- PowerShell Useful Resources
- PowerShell - Quick Guide
- PowerShell - Useful Resources
- PowerShell - Discussion
Powershell - Create Folder
Cmdlet
New-Item cmdlet is used to create a directory by passing the path using -Path as path of the directory and -ItemType as Directory.
Example
In this example, we'll create a folder in D:\Temp\ with name "Test Folder"
Type the following command in PowerShell ISE Console
New-Item -Path 'D:\temp\Test Folder' -ItemType Directory
Output
You will see the following output.
Directory: D:\temp Mode LastWriteTime Length Name ---- ------------- ------ ---- d---- 4/3/2018 7:06 PM Test Folder
You can see the same in Windows Explorer where Test Folder is created in D:/temp folder.
powershell_files_folders.htm
Advertisements
To Continue Learning Please Login
Login with Google