Remove folder name from file names

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

Remove folder name from file names

Postby tpoba4 » Mon Jun 24, 2019 10:31 am

Hi,

I know you can append folder name to the files under it, but can you remove them?

Example:

Folder1 have file Folder1-222.jpg. I would like that new name is -222.jgp.

I need this automated for multiple scenarios (not just rename before - for example).

Thanks in advance.
tpoba4
 
Posts: 1
Joined: Mon Jun 24, 2019 10:06 am

Re: Remove folder name from file names

Postby therube » Mon Jun 24, 2019 9:32 pm

How is one to determine if some "first part" of a filename is the same as the file's parent directory name?


Suppose with BRU's JavaScript renaming, you could do that.
Something like: if name.parent == part(name.name) ... (but with JS).
therube
 
Posts: 1314
Joined: Mon Jan 18, 2016 6:23 pm

Re: Remove folder name from file names

Postby Admin » Tue Jun 25, 2019 1:27 am

Hi, yes, with Javascript it can be done, e.g. check folder name, if found in name remove it. Javascript requires a commercial license.
If you contact support via e-mail we can help writing the script. thanks
Admin
Site Admin
 
Posts: 2343
Joined: Tue Mar 08, 2005 8:39 pm


Return to BRU Support