![]() |
Folder Tree and size
Hi all,
I have used Chip Pearsons Dir Tree, which is great, however I need some code that tells me how much MB is used in a directory level that I choose. Can any one help me with this please. I'm not good at writing VB code, but can follow it a bit. TIA Paul |
Folder Tree and size
Paul,
In the module "modFolderTree", search for the lines (about line numbers 335 - 340) If FullPaths = True Then Dest.Value = FolderObj.Path Else Dest.Value = FolderObj.Name End If and replace them with the following: If FullPaths = True Then Dest.Value = FolderObj.Path & _ " (" & Format(FolderObj.Size / 1048576, "###,0 MB") & ")" Else Dest.Value = FolderObj.Name & _ " (" & Format(FolderObj.Size / 1048576, "###,0 MB") & ")" End If I might make including the folder and/or file size an additional option on the form. Its a good idea. -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com (email on the web site) "Paul" wrote in message ups.com... Hi all, I have used Chip Pearsons Dir Tree, which is great, however I need some code that tells me how much MB is used in a directory level that I choose. Can any one help me with this please. I'm not good at writing VB code, but can follow it a bit. TIA Paul |
Folder Tree and size
Paul,
The free "List Files" Excel add-in program provides file and folder size with the list as well as the date. You can create a list with files and folders or just a list of folders. Download from... http://www.realezsites.com/bus/primitivesoftware No registration required. -- Jim Cone San Francisco, USA "Paul" wrote in message Hi all, I have used Chip Pearsons Dir Tree, which is great, however I need some code that tells me how much MB is used in a directory level that I choose. Can any one help me with this please. I'm not good at writing VB code, but can follow it a bit. TIA Paul |
Folder Tree and size
I put a new version of the XLA file on the site at
www.cpearson.com/excel/foldertree.htm . It gives you the option to display folder and/or file sizes in bytes, KB, or MB. -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com (email on the web site) "Chip Pearson" wrote in message ... Paul, In the module "modFolderTree", search for the lines (about line numbers 335 - 340) If FullPaths = True Then Dest.Value = FolderObj.Path Else Dest.Value = FolderObj.Name End If and replace them with the following: If FullPaths = True Then Dest.Value = FolderObj.Path & _ " (" & Format(FolderObj.Size / 1048576, "###,0 MB") & ")" Else Dest.Value = FolderObj.Name & _ " (" & Format(FolderObj.Size / 1048576, "###,0 MB") & ")" End If I might make including the folder and/or file size an additional option on the form. Its a good idea. -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com (email on the web site) "Paul" wrote in message ups.com... Hi all, I have used Chip Pearsons Dir Tree, which is great, however I need some code that tells me how much MB is used in a directory level that I choose. Can any one help me with this please. I'm not good at writing VB code, but can follow it a bit. TIA Paul |
Folder Tree and size
Thanks for the quick responses.
I will download the new xla file and try now. Much appreciated. cheers Paul On Mar 14, 12:35 pm, "Chip Pearson" wrote: I put a new version of the XLA file on the site atwww.cpearson.com/excel/foldertree.htm. It gives you the option to display folder and/or file sizes in bytes, KB, or MB. -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLCwww.cpearson.com (email on the web site) "Chip Pearson" wrote in message ... Paul, In the module "modFolderTree", search for the lines (about line numbers 335 - 340) If FullPaths = True Then Dest.Value = FolderObj.Path Else Dest.Value = FolderObj.Name End If and replace them with the following: If FullPaths = True Then Dest.Value = FolderObj.Path & _ " (" & Format(FolderObj.Size / 1048576, "###,0 MB") & ")" Else Dest.Value = FolderObj.Name & _ " (" & Format(FolderObj.Size / 1048576, "###,0 MB") & ")" End If I might make including the folder and/or file size an additional option on the form. Its a good idea. -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com (email on the web site) "Paul" wrote in message oups.com... Hi all, I have used Chip Pearsons Dir Tree, which is great, however I need some code that tells me how much MB is used in a directory level that I choose. Can any one help me with this please. I'm not good at writing VB code, but can follow it a bit. TIA Paul- Hide quoted text - - Show quoted text - |
Folder Tree and size
Thanks Jim,
This is an excellent product. Cheers Paul On Mar 14, 11:11 am, "Jim Cone" wrote: Paul, The free "List Files" Excel add-in program provides file and folder size with the list as well as the date. You can create a list with files and folders or just a list of folders. Download from...http://www.realezsites.com/bus/primitivesoftware No registration required. -- Jim Cone San Francisco, USA "Paul" wrote in message Hi all, I have used Chip Pearsons Dir Tree, which is great, however I need some code that tells me how much MB is used in a directory level that I choose. Can any one help me with this please. I'm not good at writing VB code, but can follow it a bit. TIA Paul |
All times are GMT +1. The time now is 10:54 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com