Changing all files' extensions in a folder with one command on Windows

后端 未结 11 1835
南方客
南方客 2020-12-07 08:00

How can I use the Windows command line to change the extensions of thousands of files to *****.jpg?

11条回答
  •  Happy的楠姐
    2020-12-07 08:32

    What worked for me is this one(cd to the folder first):

    Get-ChildItem -Filter *.old | Rename-Item -NewName {[System.IO.Path]::ChangeExtension($_.Name, ".new")}
    

提交回复
热议问题