Renaming files by reformatting existing filenames - placeholders in replacement strings used with the -replace operator

后端 未结 4 1227
醉话见心
醉话见心 2020-11-21 22:23

I have a few video file like this: VideoName_s01e01.mp4 where the season and episodes are variables. I want to add an underscore (\"_\") between the s??

4条回答
  •  滥情空心
    2020-11-21 23:01

    -replace is using regex, not wildcards. Thus you have to change the replace to:

    -replace '_s([0-9]{1,2})e([0-9]{1,2})', '_s$1_e$2_'
    

提交回复
热议问题