Skip to main content
deleted 4 characters in body; edited title
Source Link
Giacomo1968
  • 59.3k
  • 23
  • 181
  • 227

Powershell Renaming How can I use PowerShell scripting to rename these files?

I am new to Powershell and i need help in renaming multiple video files. So a folder contains files named as below;

  1. Episode S01E01.mkv
  2. Episode S01E02.mkv
  3. Episode S01E03.mkv . .
  4. Episode S01E350.mkv
  1. Episode S01E01.mkv 
  2. Episode S01E02.mkv 
  3. Episode S01E03.mkv
  …
  …
350. Episode S01E350.mkv

I am trying to build a script that would change the file name from "Episode S01E*.mkv"Episode S01E*.mkv to "S01E*.mkv""S01E*.mkv.

I tried to use this script but for the life of me i cannot modify it to my requirement;

$counter = 01 Get-ChildItem *.mkv | ForEach-Object {$newName = "S01E$counter" + $.Extension Rename-Item $.FullName -NewName $newName $counter++}

Thanks in Advance.

$counter = 01
Get-ChildItem *.mkv | ForEach-Object {$newName = "S01E$counter" + $_.Extension Rename-Item $_.FullName -NewName $newName $counter++}

Powershell Renaming

I am new to Powershell and i need help in renaming multiple video files. So a folder contains files named as below;

  1. Episode S01E01.mkv
  2. Episode S01E02.mkv
  3. Episode S01E03.mkv . .
  4. Episode S01E350.mkv

I am trying to build a script that would change the file name from "Episode S01E*.mkv" to "S01E*.mkv".

I tried to use this script but for the life of me i cannot modify it to my requirement;

$counter = 01 Get-ChildItem *.mkv | ForEach-Object {$newName = "S01E$counter" + $.Extension Rename-Item $.FullName -NewName $newName $counter++}

Thanks in Advance.

How can I use PowerShell scripting to rename these files?

I am new to Powershell and i need help in renaming multiple video files. So a folder contains files named as below;

  1. Episode S01E01.mkv 
  2. Episode S01E02.mkv 
  3. Episode S01E03.mkv
  …
  …
350. Episode S01E350.mkv

I am trying to build a script that would change the file name from Episode S01E*.mkv to "S01E*.mkv.

I tried to use this script but for the life of me i cannot modify it to my requirement;

$counter = 01
Get-ChildItem *.mkv | ForEach-Object {$newName = "S01E$counter" + $_.Extension Rename-Item $_.FullName -NewName $newName $counter++}
added 242 characters in body
Source Link

I am new to Powershell and i need help in renaming multiple video files. So a folder contains files named as below;

  1. Episode S01E01.mkv
  2. Episode S01E02.mkv
  3. Episode S01E03.mkv . .
  4. Episode S01E350.mkv

I am trying to build a script that would change the file name from "Episode S01E*.mkv" to "S01E*.mkv".

I tried to use this script but for the life of me i cannot modify it to my requirement;

$counter = 01 Get-ChildItem *.mkv | ForEach-Object {$newName = "S01E$counter" + $.Extension Rename-Item $.FullName -NewName $newName $counter++}

Thanks in Advance.

I am new to Powershell and i need help in renaming multiple video files. So a folder contains files named as below;

  1. Episode S01E01.mkv
  2. Episode S01E02.mkv
  3. Episode S01E03.mkv . .
  4. Episode S01E350.mkv

I am trying to build a script that would change the file name from "Episode S01E*.mkv" to "S01E*.mkv".

Thanks in Advance.

I am new to Powershell and i need help in renaming multiple video files. So a folder contains files named as below;

  1. Episode S01E01.mkv
  2. Episode S01E02.mkv
  3. Episode S01E03.mkv . .
  4. Episode S01E350.mkv

I am trying to build a script that would change the file name from "Episode S01E*.mkv" to "S01E*.mkv".

I tried to use this script but for the life of me i cannot modify it to my requirement;

$counter = 01 Get-ChildItem *.mkv | ForEach-Object {$newName = "S01E$counter" + $.Extension Rename-Item $.FullName -NewName $newName $counter++}

Thanks in Advance.

Source Link

Powershell Renaming

I am new to Powershell and i need help in renaming multiple video files. So a folder contains files named as below;

  1. Episode S01E01.mkv
  2. Episode S01E02.mkv
  3. Episode S01E03.mkv . .
  4. Episode S01E350.mkv

I am trying to build a script that would change the file name from "Episode S01E*.mkv" to "S01E*.mkv".

Thanks in Advance.