Append folder size to folder name

Bulk Rename Utility How-To's

Append folder size to folder name

Postby RenameHer » Mon Dec 13, 2021 8:39 pm

I can use the "Add" feature with " (%z)" to add files size to files, but how can I append the folder size to a folder?

Before:
Folder 1
Folder 2
Folder 3
Folder 4

After:
Folder 1 (1.5 Gig)
Folder 2 (400 MB)
Folder 3 (953 MB)
Folder 4 (900 KB)

If the only way is with Javascript, does anyone have the code snippet to do this?
RenameHer
 
Posts: 1
Joined: Mon Dec 13, 2021 10:52 am

Re: Append folder size to folder name

Postby RenamingMario » Tue Dec 19, 2023 8:56 pm

I am also wondering how to do this. I found this searching for the answer but no one responded.
RenamingMario
 
Posts: 3
Joined: Tue Dec 19, 2023 8:55 pm

Re: Append folder size to folder name

Postby therube » Wed Dec 20, 2023 8:18 pm

(With a quick look, in Win7) I don't see a (Windows) Property for "parent folder size".

If it exits ? in other OS, you might be able to use that?


Otherwise, suppose you could "gather" the directory sizes, by other means, & wrangle something together, & use the (BRU) Rename Pairs feature.
therube
 
Posts: 1367
Joined: Mon Jan 18, 2016 6:23 pm

Re: Append folder size to folder name

Postby Admin » Thu Dec 21, 2023 2:55 am

Hi, I do not think it can be done with BRU unless it is a property of the folder...
Theoretically you could use PowerShell to create a CSV with all folder sizes then import the CSV into BRU and rename the folders:
https://www.sharepointdiary.com/2021/07/get-folder-size-in-powershell.html
Admin
Site Admin
 
Posts: 2579
Joined: Tue Mar 08, 2005 8:39 pm

Re: Append folder size to folder name

Postby therube » Thu Dec 21, 2023 5:22 pm

PowerShell


In that respect, Everything.

Everything can show your directory sizes, instantly.
And you can filter your results in any manner you wish.
And you can export to .csv.
Exported results can be all that are shown, or only those that are actually selected.

(I use the 1.5 Alpha which has all the features mention. Not sure offhand if the 1.4 release version can export only selected items?)

Image
(Direct) Everything-finding-Folder-sizes.png
(csv viewer is from Salamander, but there is also Nirsoft's CSVFileView.)
therube
 
Posts: 1367
Joined: Mon Jan 18, 2016 6:23 pm


Return to How-To


cron