2 Methods to Rename Directory on Windows

2 Methods to Rename Directory on Windows

Renaming a directory is one of the most basic operation which can be performed in the operating system. This tutorial provides 2 methods how to do that on Windows.

Method 1 - CMD

The move command can be used to rename the directory. First argument is old directory name, second argument is new directory name.

move docs/test docs/new_test >nul

The >nul is used to suppress output "1 dir(s) moved".

Method 2 - PowerShell

In PowerShell, directory can be renamed with Move-Item command.

Move-Item docs/test docs/new_test

Leave a Comment

Cancel reply

Your email address will not be published.