Cannot change directory names using RegEx but works on files

Post any Bulk Rename Utility support requirements here. Open to all registered users.

Cannot change directory names using RegEx but works on files

Postby keithslarke » Fri Nov 11, 2016 5:01 pm

I am using the following ^(.*)(\d{4})$ command in RegEx(1) to collect 4 numbers from a directory name and file names and move them around using, replace (\2)(\1)

The problem is that is appears to work fine on files but will not work on directory names.

I am able to change the directory names by using the replace "-" with "@" for example using replace(3) command on BRU but the RegEx(1) command will only work on file names.

all other boxes are the default values from installation.

Please can you help I am sure I am missing some small option.

Thanks

Keith.
keithslarke
 
Posts: 1
Joined: Fri Nov 11, 2016 4:49 pm

Re: Can not change directory names using RegEx but worksOn Files

Postby Emerkamp » Sat Nov 12, 2016 2:28 am

Hello:
Sections (12), Folders is ticked.

Can you use \d\d\d\d instaead, for the 4 numbers
Maybe an example name will help.
Emerkamp
 
Posts: 112
Joined: Sat Aug 23, 2014 2:35 pm

Re: Can not change directory names using RegEx but worksOn Files

Postby KenP » Sat Nov 12, 2016 3:12 am

RegEx works on files and folders, so if both the files and folders have 4 digits at the very end of the name (excluding the file extensions) and you have the folders and files selected your code should work.

As the previous poster said it would be helpful if you could post examples of both the file names and the folder names.
KenP
 
Posts: 198
Joined: Sat Jul 30, 2016 11:25 am


Return to BRU Support