PowerShell and Git to Capitalize all the Files in a Directory on Windows

Windows is a case-folding operating system, which means that changing the case of a file name is non-trivial.

The following uses PowerShell and Git to capitalize all the files names in a directory.

dir | % { git mv -f $_.Name "$($_.Name[0].ToString().ToUpper())$($_.Name.Substring(1))" }  

It's a bit hard to read, but it gets the job done.

See also: https://stackoverflow.com/questions/1793735/change-case-of-a-file-on-windows