Renaming sub-folders

A swapping-ground for Regular Expression syntax

Renaming sub-folders

Postby Song » Wed Jan 11, 2017 11:53 am

Hello,

I need to rename sub-directories which each have the same name. Please advise which options to select to achieve this.

I have x amount of subfolders in a directory with the same name each in their own sub directory with a differant name.

example

X: All files > "unique directory name" > "directory I need to rename"

Thanks,
Song
Song
 
Posts: 2
Joined: Wed Jan 11, 2017 11:40 am

Re: Renaming sub-folders

Postby KenP » Wed Jan 11, 2017 1:02 pm

This should work.

RegEx (1)
Match: ^Sub-Folder Name$
Replace: New Sub-Folder Name
    (In Match: replace "Sub-Folder Name" with the name of the sub-folders you want to rename)

Filters (12)
Folders: Select
Files: De-Select
Subfolders: Select

In the folder tree window select the directory that contains all the folders and sub-folders.
In the main window select all the folders, only the sub-folders who's name is in "RegExt (1)/Match" will have their names changed
KenP
 
Posts: 198
Joined: Sat Jul 30, 2016 11:25 am

Re: Renaming sub-folders

Postby Song » Thu Jan 12, 2017 12:35 pm

Brilliant!

Worked perfectly. I really appreciate the assistance :D
Song
 
Posts: 2
Joined: Wed Jan 11, 2017 11:40 am

Re: Renaming sub-folders

Postby totesmomsgoats » Wed Oct 11, 2017 6:14 pm

Great script, thanks for the help. My question is, what can we do to limit the renaming to say the 3rd level of a folder? If someone set a duplicate name lower in the folder structure, would it rename these as well?
totesmomsgoats
 
Posts: 1
Joined: Wed Oct 11, 2017 5:22 pm


Return to Regular Expressions


cron