INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Is there a way to export folder sizes from MC 23?  (Read 1963 times)

FenceFurniture

  • Galactic Citizen
  • ****
  • Posts: 420
Is there a way to export folder sizes from MC 23?
« on: September 07, 2019, 12:30:56 am »

I know the size of each folder (album) that I select displays at the bottom, but is there a way of exporting to a csv the sizes of each album folder? Or at least a way of displaying them all at the same time in the window?

(it would be very convenient if Windows displayed the folder sizes, as it suggests it can, but it doesn't put a value in. Nor does hovering over each folder work each time)

Technically I could export the data for all the files in each of the folders and then put in a sum for each one, but that would be slower than just reading each one and manually entering it into my spreadsheet (because there are 495 albums).
Logged

wer

  • Citizen of the Universe
  • *****
  • Posts: 2640
Re: Is there a way to export folder sizes from MC 23?
« Reply #1 on: September 07, 2019, 01:09:07 am »

There are lots of Windows utilities that do exactly what you want.  Google "folder sizes" and you'll see them.
Logged

FenceFurniture

  • Galactic Citizen
  • ****
  • Posts: 420
Re: Is there a way to export folder sizes from MC 23?
« Reply #2 on: September 07, 2019, 01:12:05 am »

Ok, thanks wer.
Logged

RoderickGI

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 8186
Re: Is there a way to export folder sizes from MC 23?
« Reply #3 on: September 07, 2019, 02:25:43 am »

Simple.
In MC for Audio files only for each Album, as an example;

Under the Audio group in the Navigation Pane at the left of Standard View, make a Category View with one Category of "Album", save that, then change the List Style to "Details".
    If you just want to see the total in Excel, add a Column to the View for the field [File Size]. That will show values such as "295 MB total".
    If you want to do calculations in the spreadsheet after collecting the data, add an Expression Column to the View and enter the expression [file size,0]. That will show the total size of all files for the Album in Bytes.
    If you want to do calculations in the spreadsheet after collecting the data, but want the size in Megabytes (MB), then use the expression;
        Math([file size,0] / (1024*1024))
    If you want that size in MB, but rounded to a whole number, then use the expression;
        Math(round([file size,0] / (1024*1024)))
    See https://wiki.jriver.com/index.php/Miscellaneous_Functions#Math for more options in rounding, truncation, etc.
Remove any Columns from the View that you don't want, or add any extras that you do want.
Select all items in the View (Ctrl-A).
Copy all items in the View (Ctrl-C)
Open your spreadsheet and select the cell that you wish to start the paste into. i.e. The top left corner. Paste the contents of the View into your spreadsheet (Ctrl-V)

Done.

If you actually wanted the folder size for all folders that audio files are in, for example if you have sub-folders for CD Discs as I do, then just make the Category View above for "Filename (path)" instead of "Album".

Once you have one or both of the above Views created you can sort and filter them as you desire. The Copy and Paste will use those settings, so that is what you will get in the spreadsheet.


The key to the above, other than the Copy and Paste functionality, is that the [File size] field will show the total of all files for the group of items being listed in a Category. No need to do any fancy processing.

All done in MC, so it works only on files imported into MC, and does not include ancillary files such as Cover Art, Extras, Sidecar files, or any other files in the folder. Just the files in the MC Library.

So if you want the total size of all files in a folder, including ancillary files, then use Wer's solution.
Logged
What specific version of MC you are running:MC27.0.27 @ Oct 27, 2020 and updating regularly Jim!                        MC Release Notes: https://wiki.jriver.com/index.php/Release_Notes
What OS(s) and Version you are running:     Windows 10 Pro 64bit Version 2004 (OS Build 19041.572).
The JRMark score of the PC with an issue:    JRMark (version 26.0.52 64 bit): 3419
Important relevant info about your environment:     
  Using the HTPC as a MC Server & a Workstation as a MC Client plus some DLNA clients.
  Running JRiver for Android, JRemote2, Gizmo, & MO 4Media on a Sony Xperia XZ Premium Android 9.
  Playing video out to a Sony 65" TV connected via HDMI, playing digital audio out via motherboard sound card, PCIe TV tuner

wer

  • Citizen of the Universe
  • *****
  • Posts: 2640
Re: Is there a way to export folder sizes from MC 23?
« Reply #4 on: September 07, 2019, 02:37:31 am »

Simple.

If that's simple, what do you call complicated?   ;)
Logged

RoderickGI

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 8186
Re: Is there a way to export folder sizes from MC 23?
« Reply #5 on: September 07, 2019, 02:56:37 am »

Cheeky.

I used a lot of words. It really is simple. I could have said;

Add the [Files size] column to your Album View.
Ctrl-A, Ctrl-C
Switch to your spreadsheet
Ctrl-V

Done.  :P
Logged
What specific version of MC you are running:MC27.0.27 @ Oct 27, 2020 and updating regularly Jim!                        MC Release Notes: https://wiki.jriver.com/index.php/Release_Notes
What OS(s) and Version you are running:     Windows 10 Pro 64bit Version 2004 (OS Build 19041.572).
The JRMark score of the PC with an issue:    JRMark (version 26.0.52 64 bit): 3419
Important relevant info about your environment:     
  Using the HTPC as a MC Server & a Workstation as a MC Client plus some DLNA clients.
  Running JRiver for Android, JRemote2, Gizmo, & MO 4Media on a Sony Xperia XZ Premium Android 9.
  Playing video out to a Sony 65" TV connected via HDMI, playing digital audio out via motherboard sound card, PCIe TV tuner

wer

  • Citizen of the Universe
  • *****
  • Posts: 2640
Re: Is there a way to export folder sizes from MC 23?
« Reply #6 on: September 07, 2019, 03:02:14 am »

Squirrels have to be cheeky.  Need a place to stash those walnuts.

I suggest we let Mr. FenceFurniture pass judgement.  Fence knows a simple solution when he sees one.  Fence LIKES simple solutions.  If he considers your solution simple, I will stop twitching my tail.
Logged

RoderickGI

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 8186
Re: Is there a way to export folder sizes from MC 23?
« Reply #7 on: September 07, 2019, 03:18:03 am »

True, but I don't write answers just for the person who asked the question.

I write them for all readers who are searching for answers, now or in future.
Logged
What specific version of MC you are running:MC27.0.27 @ Oct 27, 2020 and updating regularly Jim!                        MC Release Notes: https://wiki.jriver.com/index.php/Release_Notes
What OS(s) and Version you are running:     Windows 10 Pro 64bit Version 2004 (OS Build 19041.572).
The JRMark score of the PC with an issue:    JRMark (version 26.0.52 64 bit): 3419
Important relevant info about your environment:     
  Using the HTPC as a MC Server & a Workstation as a MC Client plus some DLNA clients.
  Running JRiver for Android, JRemote2, Gizmo, & MO 4Media on a Sony Xperia XZ Premium Android 9.
  Playing video out to a Sony 65" TV connected via HDMI, playing digital audio out via motherboard sound card, PCIe TV tuner

wer

  • Citizen of the Universe
  • *****
  • Posts: 2640
Re: Is there a way to export folder sizes from MC 23?
« Reply #8 on: September 07, 2019, 03:52:41 am »

Truly, you're a credit to all mankind, and a gift to the generations.

Is there somewhere I can get a coffee mug with your likeness on it?   :P
Logged

FenceFurniture

  • Galactic Citizen
  • ****
  • Posts: 420
Re: Is there a way to export folder sizes from MC 23?
« Reply #9 on: September 07, 2019, 03:58:59 am »

Thank you for all that detail Roderick. The first part produced exactly what I wanted, and can now export it, then merge it into the current sheet. (believe it or not I am quite proficient with higher level Excel and VB, although these days it is sometimes a while between so I get a little rusty with formulae and code)

All done in MC, so it works only on files imported into MC, and does not include ancillary files such as Cover Art, Extras, Sidecar files, or any other files in the folder. Just the files in the MC Library.
Yep, just want the music sizes.
Logged

FenceFurniture

  • Galactic Citizen
  • ****
  • Posts: 420
Re: Is there a way to export folder sizes from MC 23?
« Reply #10 on: September 07, 2019, 04:14:07 am »

Fence knows a simple solution when he sees one.  Fence LIKES simple solutions.
I do indeed, on both counts. Simple problems need simple solutions. Complex problems do too, but that's not always possible.

Be still thy twitching tail!  ;D

(I was going to check your suggestion, but other stuff got in the way before Roderick's "inhouse" solution came up)
Logged

RoderickGI

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 8186
Re: Is there a way to export folder sizes from MC 23?
« Reply #11 on: September 07, 2019, 06:25:46 pm »

Should I set up a Patreon account so you can start sending me money Wer?  :D

Judgement has been passed. Well done FenceFurniture.  8)
Logged
What specific version of MC you are running:MC27.0.27 @ Oct 27, 2020 and updating regularly Jim!                        MC Release Notes: https://wiki.jriver.com/index.php/Release_Notes
What OS(s) and Version you are running:     Windows 10 Pro 64bit Version 2004 (OS Build 19041.572).
The JRMark score of the PC with an issue:    JRMark (version 26.0.52 64 bit): 3419
Important relevant info about your environment:     
  Using the HTPC as a MC Server & a Workstation as a MC Client plus some DLNA clients.
  Running JRiver for Android, JRemote2, Gizmo, & MO 4Media on a Sony Xperia XZ Premium Android 9.
  Playing video out to a Sony 65" TV connected via HDMI, playing digital audio out via motherboard sound card, PCIe TV tuner

FenceFurniture

  • Galactic Citizen
  • ****
  • Posts: 420
Re: Is there a way to export folder sizes from MC 23?
« Reply #12 on: September 14, 2019, 12:51:58 am »

    If you want to do calculations in the spreadsheet after collecting the data, add an Expression Column to the View and enter the expression [file size,0]. That will show the total size of all files for the Album in Bytes.
    If you want that size in MB, but rounded to a whole number, then use the expression;
        Math(round([file size,0] / (1024*1024)))

    See https://wiki.jriver.com/index.php/Miscellaneous_Functions#Math for more options in rounding, truncation, etc.
I don't seem to be able to get the Expression part of this working. I've got File Size, showing 89.0MB (for example), and some other columns. This particular view is called Album Size. When I right click on it, Customise View, Add, Expression and paste that Math expression above, it just wipes out all the data and says "varies" for Album Artist and Album.

I'm clearly not doing it correctly - have tried different permutations, but.....no luck.
Logged

FenceFurniture

  • Galactic Citizen
  • ****
  • Posts: 420
Re: Is there a way to export folder sizes from MC 23?
« Reply #13 on: September 14, 2019, 12:59:47 am »

Ok, so that Expression routine can be somewhat confusing - you have to be adding an Expression to the right thing. I subsequently stumbled across it by not clicking customise View, but by clicking Columns.

Problem solved.
Logged

RoderickGI

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 8186
Re: Is there a way to export folder sizes from MC 23?
« Reply #14 on: September 14, 2019, 01:56:25 am »

Well, I did say Expression Column, not Expression Category. The devil is always in the details. ;D

But it sounds like you have found the right spot to add the Expression Column.
Logged
What specific version of MC you are running:MC27.0.27 @ Oct 27, 2020 and updating regularly Jim!                        MC Release Notes: https://wiki.jriver.com/index.php/Release_Notes
What OS(s) and Version you are running:     Windows 10 Pro 64bit Version 2004 (OS Build 19041.572).
The JRMark score of the PC with an issue:    JRMark (version 26.0.52 64 bit): 3419
Important relevant info about your environment:     
  Using the HTPC as a MC Server & a Workstation as a MC Client plus some DLNA clients.
  Running JRiver for Android, JRemote2, Gizmo, & MO 4Media on a Sony Xperia XZ Premium Android 9.
  Playing video out to a Sony 65" TV connected via HDMI, playing digital audio out via motherboard sound card, PCIe TV tuner
Pages: [1]   Go Up