I need to replace spaces with dashes in TV episodes

Bulk Rename Utility How-To's

I need to replace spaces with dashes in TV episodes

Postby Ronstang » Sun Aug 22, 2021 9:36 pm

Currently my DVR records my TS files with names like:

Santiago of the Seas S01E31 Triton's Trumpet

But once I compress them and organize them into their folders all of my TV shows are currently named as such:

Santiago of the Seas-S01E31-Triton's Trumpet

So I need to simply replace the spaces with dashes.

Any help would be greatly appreciated. I am slowly starting to understand some of the things needed to use this awesome program but that is still limited to mostly modifying settings someone has already shown me to use....then experimenting.
Ronstang
 
Posts: 15
Joined: Tue Feb 09, 2021 2:14 am

Re: Replace all spaces inside TV 'episode'

Postby Luuk » Mon Aug 23, 2021 3:46 am

To replace all spaces, use Replace(3) with a space inside of 'Replace' and - inside of 'With'.

To replace all spaces before S##E##, use RegEx(1) with a checkmark in "v2", so then a 'Match' and 'Replace' like...
\ (?=.+-S\d\dE\d\d-.+)/g
-
To replace all spaces after S##E##, just change the 'Match' to...
\ (?!.+S\d\dE\d\d-)/g
Luuk
 
Posts: 334
Joined: Fri Feb 21, 2020 10:58 pm

Re: I need to replace spaces with dashes in TV episodes

Postby Ronstang » Mon Aug 23, 2021 4:32 am

Thank you Luuk but I am really confused as to what goes in to the 'Match" field and what goes into the 'Replace' field here. I don't want all the spaces replaced, just the ones before and after the SXXEXX field but I am still confused as to what goes where.
Ronstang
 
Posts: 15
Joined: Tue Feb 09, 2021 2:14 am

Replace all spaces in names with -S##E##-

Postby Luuk » Mon Aug 23, 2021 7:19 am

I forget to say... Inside Filters(12) to put a 'Mask' like -S\d\dE\d\d- then put a checkmark in RegEx to conduct this filter!
Then to replace all of your spaces, you can just use the Replace(3) settings above.
Luuk
 
Posts: 334
Joined: Fri Feb 21, 2020 10:58 pm

Re: I need to replace spaces with dashes in TV episodes

Postby Ronstang » Sun Aug 29, 2021 7:32 pm

I'm very confused. I don't want to replace ALL the spaces. I just want to replace the spaces before and after S##E## with dashes so:

What on Earth S01E03 Secrets of Sahara.ts

Becomess

What on Earth-S01E03-Secrets of Sahara.ts
Ronstang
 
Posts: 15
Joined: Tue Feb 09, 2021 2:14 am

Re: I need to replace spaces with dashes in TV episodes

Postby Luuk » Mon Aug 30, 2021 6:03 am

Sorry, I thought from the first post, that after compressing, they were already named like "Santiago of the Seas-S01E31-Triton's Trumpet".
And then you need to replace some of the spaces, so thats what all of the confusion comes from guessing about which spaces to replace?

To simply replace " S##E## " with "-S##E##-" the 'Match' and 'Replace' is like...
(.+) (S\d\dE\d\d) (.+)
\1-\2-\3

To only conduct .ts files, you can type a Filters(12) 'Mask' like *.ts and then click the blue-arrows beside 'Mask'.
Luuk
 
Posts: 334
Joined: Fri Feb 21, 2020 10:58 pm

Re: I need to replace spaces with dashes in TV episodes

Postby Ronstang » Sat Sep 04, 2021 7:05 am

Thank you so much, works brilliantly. I love this program and need it a lot now that I have moved to manually controlling my content. Unfortunately I don't understand scripting syntax so much of this is foreign to me.
Ronstang
 
Posts: 15
Joined: Tue Feb 09, 2021 2:14 am

Re: I need to replace spaces with dashes in TV episodes

Postby dec » Thu Oct 14, 2021 6:44 am

... is using RegEx? which i have no understanding of at all. where is QRG?

does normal Replace accept wild cards in char strings?
ie 'd*s* '
dec
 
Posts: 3
Joined: Thu Oct 14, 2021 6:31 am


Return to How-To