Leave a comment

Your email address will not be published. Required fields are marked *

One thought on “Rename all files/folders to lowercase

  • Rupert

    Get-ChildItem -Path “C:Userskhaleesi*.txt” -Recurse | % { if ($_.Name -cne $_.Name.ToLower()) { ren $_.FullName $_.Name.ToLower() } }

    Seconds : 0
    Milliseconds : 84
    Ticks : 848049
    TotalDays : 9.81538194444444E-07
    TotalHours : 2.35569166666667E-05
    TotalMinutes : 0.001413415
    TotalSeconds : 0.0848049
    TotalMilliseconds : 84.8049

    $a = Get-ChildItem -Path “C:Userskhaleesi*.txt” -Recurse
    foreach ($i in $a) { if ($i.Name -cne $i.Name.ToLower()) { ren $i.FullName $i.Name.ToLower() } }

    Days : 0
    Hours : 0
    Minutes : 0
    Seconds : 0
    Milliseconds : 63
    Ticks : 632599
    TotalDays : 7.32174768518519E-07
    TotalHours : 1.75721944444444E-05
    TotalMinutes : 0.00105433166666667
    TotalSeconds : 0.0632599
    TotalMilliseconds : 63.2599