Rename folders with the filename within that folder

Would you like Bulk Rename Utility to offer new functionality? Post your comments here!

Rename folders with the filename within that folder

Postby Shawy2025 » Wed Jan 29, 2025 12:15 am

Hi,

Just wondering if it's possible to bulk rename folders with the filename that is contained within that folder.

Example:
Folder name: 0AU3s4YpT97TRPjL
Filename within that folder: CricketScores.pdf

How I'd like it to look:
Folder name: Cricket Scores
Filename: CricketScores.pdf

Thank you in advance,

Steve
Shawy2025
 
Posts: 1
Joined: Wed Jan 29, 2025 12:06 am

Re: Rename folders with the filename within that folder

Postby Admin » Thu Feb 06, 2025 11:55 pm

Hi, I do not think that's possible yet, but we plan to include this in the next update (it will be a JavaScript function probably).
Admin
Site Admin
 
Posts: 2883
Joined: Tue Mar 08, 2005 8:39 pm

Re: Rename folders with the filename within that folder

Postby Admin » Tue Mar 04, 2025 12:15 am

This is possible now with JavaScript renaming and new function:

listFilesInFolder("pattern", includeHidden,includeSystem)

newName = removeExt(listFilesInFolder()); // the new name is set to the first file name in a folder, without its extension
newName = removeExt(listFilesInFolder("*.pdf")); // the new name is set to the first PDF file name in a folder, without its extension
newName = removeExt(listFilesInFolder()[0]); // the new name is set to the first file name in a folder, without its extension
newName = removeExt(listFilesInFolder("*.*", true, true)[9]); // the new name is set to the 10th file name in a folder, without its extension. The file list includes system and hidden files.
Admin
Site Admin
 
Posts: 2883
Joined: Tue Mar 08, 2005 8:39 pm


Return to Suggestions