How to loop through files and rename using PowerShell?

后端 未结 2 1421
深忆病人
深忆病人 2020-12-09 16:30

I would like to rename all the jpg files in a folder to uniform convention like Picture00000001.jpg where 00000001 is a counter.

It would be a walk in the park in C

2条回答
  •  难免孤独
    2020-12-09 17:00

    Try this to get the FilenameWithOutExtension

    $f.DirectoryName + "\" + $f.BaseName

提交回复
热议问题