7.6. Renaming Multiple Files at OnceTo change the extensions of a folder of .htm files to .html files: MSH D:\MshScripts> get-childitem *.htm | foreach-object { rename-item $_.name $_.name.replace(".htm",".html") } Instead of changing the extension, we can change part of the stem. For a folder containing image1.gif, image2.gif, etc., let's replace the "image" part with something more meaningful: MSH D:\MshScripts> get-childitem image*.gif | foreach-object { rename-item $_.name $_.name.replace("image", "inventory") } Alternatively, we can change all filenames to be lowercase: MSH D:\MshScripts> get-childitem | foreach-object { rename-item $_.name $_.name.tolower( ) } |