in

WindowsWindows Loving ItLoving It

Create Folders in PowerShell Anywhere | Any time | Latest -TecKangaroo

Create folders in powershell using easy and quick syntax. It will help the users to create the folders in the current folder, other folder using full path.

PowerShell create folders

In this post, we are going to see how to create a directory using Powershell.  We can create a directory using the md commandlet.  The syntax is given below.

md <foldername>

Be sure to replace <foldername> with the desired folder name.

The example,

md TecKangaroo

The output of the above script is shown below.

md teckangaroo
md teckangaroo

If we check the folders present in the current directory, we can see the newly created folder.  We can use the gci command let to check the folders in the current directory.

gci

The output of the above script is given below.

created a new folder called TecKangaroo
created a new folder called TecKangaroo

We can create a folder at a different directory with the help of full path.

In the below example we will create a folder inside newly created folder TecKangaroo.

md .\TecKangaroo\folder1

The output of the above script is given here.

creating folder inside another
creating folder inside another

finally, we will create a folder using a full path.

md E:\pwrshl\TecKangaroo\folder1\folder2

The output of the above script is given below.

create folder using full path
create folder using full path-

Verdict:

In this post, wer learned how to create a folder using PowerShell.  We can use md command let and pass the folder name to create a folder.  If you want to know more about directories and PowerShell, please let us know in the comments below.

Leave a Reply

Your email address will not be published. Required fields are marked *