Move word in file name

A swapping-ground for Regular Expression syntax

Move word in file name

Postby Darkaos » Sat Dec 10, 2022 7:12 am

Is there away to move the location of _HD in the file name

Change From This:
001[CC]FileName_HD_01[########].mp4
002[CC]FileName_HD_02[########].mp4

To This:
001[CC]FileName_01_HD[########].mp4
002[CC]FileName_02_HD[########].mp4
Darkaos
 
Posts: 2
Joined: Sat Dec 10, 2022 7:01 am

Re: Move word in file name

Postby Admin » Sat Dec 10, 2022 7:42 am

Use ReEx (1) and enable Simple in RegeEx

then
Match: %1_%2_%3[%4]
Replace: %1_%3_%2[%4]
Admin
Site Admin
 
Posts: 2354
Joined: Tue Mar 08, 2005 8:39 pm

Re: Move word in file name

Postby Darkaos » Sat Dec 10, 2022 8:27 am

That worked, thank you for your help
Darkaos
 
Posts: 2
Joined: Sat Dec 10, 2022 7:01 am

Re: Move word in file name

Postby dec » Mon Mar 20, 2023 2:35 pm

what if there are other underscores in file name?
dec
 
Posts: 67
Joined: Thu Oct 14, 2021 6:31 am

Re: Move word in file name

Postby Admin » Tue Mar 21, 2023 5:40 am

Example renaming before -> after?
Admin
Site Admin
 
Posts: 2354
Joined: Tue Mar 08, 2005 8:39 pm


Return to Regular Expressions