4

I have many folders and subfolders. They have random uppercase or lowercase letters in their names. I'd like to rename all of them into lowercase version.

I see many answer here about renaming files but not folders. How'd I do it using command prompt?

5
  • 2
    Maybe you could update your question and show us what you've already tried and where you got stuck?
    – Berend
    Apr 21, 2021 at 6:33
  • I am not familiar with command prompt code.
    – Vahn
    Apr 21, 2021 at 6:55
  • If you're not familiar with command prompt code (yet), why do you want a solution that uses that?
    – Berend
    Apr 21, 2021 at 7:44
  • why not? I know command prompt can do something to folder or file access etc. But, I do not know how to rename folders
    – Vahn
    Apr 21, 2021 at 8:38
  • the rename command can rename both files and directories
    – Berend
    Apr 21, 2021 at 9:31

2 Answers 2

5

It's much easier to use PowerShell instead of the legacy cmd

Get-ChildItem -Directory -Recurse | Rename-Item -NewName { $_.Name.ToLower() } -WhatIf

Shorter version

ls -Di -R | ren -Ne { $_.Name.ToLower() } -wi

It'll rename all subfolders of the current folder to lowercase

After confirming the new names are correct then remove -WhatIf / -wi to do real renaming

1

Have you tried one of those batch renamer software? Some are free and very easy to use, it could be easier than trying to do it with the windows cmd. Here's one free if you want to give it a try; https://www.bulkrenameutility.co.uk/

4
  • 1
    I haven't installed it. but from the website description it is not rename folders,is it?
    – Vahn
    Apr 21, 2021 at 6:57
  • 1
    If you scroll down to the "Basic Features" section they say it can rename folder, and from what I remember when I used it years ago I'm pretty sure I did just that :) Apr 21, 2021 at 7:06
  • If you uncheck everything but the case section(4), set it to lower case and check only folder in filter (12) I think you'll get exactly what you want Apr 21, 2021 at 7:09
  • a folder is just a special file that contains other files. Anything that renames a file will also rename a folder
    – phuclv
    Apr 21, 2021 at 10:26

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .