Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When I to run ren controller Controller in PowerShell I get this error message:

ren : Source and destination path must be different.
At line:1 char:1
+ ren .\controller Controller
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : WriteError: (D:\dev\www\tria...sses\controller:String) [Rename-Item], IOException
    + FullyQualifiedErrorId : RenameItemIOError,Microsoft.PowerShell.Commands.RenameItemCommand

How do I change the case of a file here?

share|improve this question
I guess the first question is why do you need too? As far as windows is concerned, those are the same name. – EBGreen Jan 22 '13 at 21:27
Yes, but it's not the same on unix systems and I have some code files I need to correct because a library I'm using require them to have a certain case now, while earlier it didn't. – Svish Jan 22 '13 at 21:41
In powershell v3 I can modify the case of filenames using ren. What version of powershell are you using? – zdan Jan 22 '13 at 23:02
@zdan How do I tell? I'm using whatever GitHub For Windows launches for me :p – Svish Jan 23 '13 at 2:06
$host will tell you what version you are running – Mike Jan 23 '13 at 13:09

It works for me:

PS C:\> "" > controller
PS C:\> ren .\controller Controller
PS C:\> dir Controller

    Directory: C:\

Mode                LastWriteTime     Length Name
----                -------------     ------ ----
-a---         1/22/2013   5:01 PM          6 Controller
share|improve this answer

The OP's code also works for me, under PSH 3.0 and cmd. How about the old standby:

ren controller controller2
ren controller2 Controller

It's ugly, but it works.

Additional thought: Doesn't git have a rename, by way of the mv command? Relevant.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.