CmdID

CmdID / Commands

rename-item

Powershell command to rename an item. tldr-pages

On Windows

Opens CmdID with your command. It is read in your browser and sent nowhere.

Windows

from tldr-pages, CC BY 4.0

Powershell command to rename an item. Note: ren and rni can both be used as an alias for Rename-Item.

Rename a file

Rename-Item -Path "path\to\file" -NewName "new_file_name"Identify

Rename a directory

Rename-Item -Path "path\to\directory" -NewName "new_directory_name"Identify

Rename and move a file

Rename-Item -Path "path\to\file" -NewName "path\to\new_file_name"Identify

Rename a file by force

Rename-Item -Path "path\to\file" -NewName "new_file_name" -ForceIdentify

Prompt confirmation before renaming a file

Rename-Item -Path "path\to\file" -NewName "new_file_name" -cfIdentify