How to create a new folder/directory with Powershell

For more details, visit https://www.sharepointdiary.com/2021/07/create-a-folder-using-powershell.html.

Sharepoint diary is a good site. There is a page on learning Powershell at https://www.sharepointdiary.com/powershell/powershell-tutorial.

I typed

New-Item -Path "C:\Users\peter\OneDrive - Marshall University\Documents" -Name "bulk-rename-utility" -ItemType Directory

I ran the command and this is the output.

The rest of the code was my attempt to use ls to display folders but only folders that matched the regex “bulk-rename-utility” and “bulk*”.

I can now change directory to bulk-rename-utility.

In Linux, make a new directory with mkdir. In File Explorer, use Ctrl+Shift+N. Total Commander also has a way to create a new directory by pressing a button.

Leave a Reply

Discover more from Peter C. Burbery website

Subscribe now to keep reading and get access to the full archive.

Continue reading