Jun 29, 2001 #1 gwinn7 Programmer Feb 10, 2001 1,004 US Does anyone have any code that fetches the size of a particular folder on a local or network drive? For example C:\My Documents ==> 4522623 Bytes N:\Shared ==> 10002112 Bytes Gary gwinn7
Does anyone have any code that fetches the size of a particular folder on a local or network drive? For example C:\My Documents ==> 4522623 Bytes N:\Shared ==> 10002112 Bytes Gary gwinn7
Jun 29, 2001 1 #2 strongm MIS May 24, 2001 20,201 GB Add a reference to the Microsoft Scripting Runtime to your project. Then drop the following into a module: Public Function GetFolderSize(ByVal strFolder As String) As Long Dim fso As FileSystemObject Set fso = New FileSystemObject GetFolderSize = fso.GetFolder(strFolder).Size Set fso = Nothing End Function Upvote 0 Downvote
Add a reference to the Microsoft Scripting Runtime to your project. Then drop the following into a module: Public Function GetFolderSize(ByVal strFolder As String) As Long Dim fso As FileSystemObject Set fso = New FileSystemObject GetFolderSize = fso.GetFolder(strFolder).Size Set fso = Nothing End Function
Jun 29, 2001 1 Thread starter #3 gwinn7 Programmer Feb 10, 2001 1,004 US This is great and very usable. Thank you. Are there any API techniques for this as well? Thanks again! Gary gwinn7 Upvote 0 Downvote
This is great and very usable. Thank you. Are there any API techniques for this as well? Thanks again! Gary gwinn7