Page 1 of 1

Append folder size to folder name

PostPosted: Mon Dec 13, 2021 8:39 pm
by RenameHer
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?

Re: Append folder size to folder name

PostPosted: Tue Dec 19, 2023 8:56 pm
by RenamingMario
I am also wondering how to do this. I found this searching for the answer but no one responded.

Re: Append folder size to folder name

PostPosted: Wed Dec 20, 2023 8:18 pm
by therube
(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.

Re: Append folder size to folder name

PostPosted: Thu Dec 21, 2023 2:55 am
by Admin
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

Re: Append folder size to folder name

PostPosted: Thu Dec 21, 2023 5:22 pm
by therube
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.)