Advertisement

05.20.2005 at 03:08PM PDT, ID: 21431865
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

7.6

Get File Sizes and Export to Excel

Asked by BNettles73 in Visual Basic Programming

Tags: , ,



I'm seriously a rookie and have no clue what I'm doing ... that being said, can someone give me a hand with this script? Am I using the wrong command to get filesize? Some error handling would be great as well! Thanks!

Line: 44
Char: 4
Error: Type mismatch: 'FileLen'
Code: 800A000D

Set objFileSystem = CreateObject("Scripting.FileSystemObject")
Set objFile = objFileSystem.CreateTextFile("E2K3DatabaseSize.csv", True, False)

Dim strLine

'Storage Groups
Dim strEEV01f,strEEV01g,strEEV01h,strEEV01i

'Mailbox Stores
Dim SG1MBXStore1,SG1MBXStore2,SG1MBXStore3,SG1MBXStore4
Dim SG2MBXStore1,SG2MBXStore2,SG2MBXStore3,SG2MBXStore4
Dim SG3MBXStore1,SG3MBXStore2,SG3MBXStore3,SG3MBXStore4
Dim SG4MBXStore1,SG4MBXStore2,SG4MBXStore3,SG4MBXStore4

'Databases
Dim strFile11,strFile12,strFile13,strFile14
Dim strFile21,strFile22,strFile23,strFile24
Dim strFile31,strFile32,strFile32,strFile34
Dim strFile41,strFile42,strFile43,strFile44

'Database Size
Dim strSize11,strSize12,strSize13,strSize14
Dim strSize21,strSize22,strSize23,strSize24
Dim strSize31,strSize32,strSize33,strSize34
Dim strSize41,strSize42,strSize43,strSize44

strLine = "Path,Database,Size"

objFile.WriteLine strLine

      'Information for
      strEEV01f = "\\cdc01eev01\f$\EXCHSRVR\MDBDATA"
      strSG1MBXStore1 = "SG1MBXStore1.edb"
      strSG1MBXStore2 = "SG1MBXStore2.edb"
      strSG1MBXStore3 = "SG1MBXStore3.edb"
      strSG1MBXStore4 = "SG1MBXStore4.edb"

            strFile1 = strEEV01f & "\" & strSG1MBXStore1
            strFile2 = strEEV01f & "\" & strSG1MBXStore2
            strFile3 = strEEV01f & "\" & strSG1MBXStore3
            strFile4 = strEEV01f & "\" & strSG1MBXStore4

                  strSize11 = FileLen(strFile1)
                  strSize12 = FileLen(strFile1)
                  strSize13 = FileLen(strFile1)
                  strSize14 = FileLen(strFile1)

      strEEV01g = "\\cdc01eev01\g$\EXCHSRVR\MDBDATA"
      strSG2MBXStore1 = "SG2MBXStore1.edb"
      strSG2MBXStore2 = "SG2MBXStore2.edb"
      strSG2MBXStore3 = "SG2MBXStore3.edb"
      strSG2MBXStore4 = "SG2MBXStore4.edb"

            strFile21 = strEEV01g & "\" & strSG2MBXStore1
            strFile22 = strEEV01g & "\" & strSG2MBXStore2
            strFile23 = strEEV01g & "\" & strSG2MBXStore3
            strFile24 = strEEV01g & "\" & strSG2MBXStore4

                  strSize21 = FileLen(strFile21)
                  strSize22 = FileLen(strFile22)
                  strSize23 = FileLen(strFile23)
                  strSize24 = FileLen(strFile24)
      
      strEEV01h = "\\cdc01eev01\h$\EXCHSRVR\MDBDATA"
      strSG3MBXStore1 = "SG3MBXStore1.edb"

            strFile31 = strEEV01h & "\" & strSG3MBXStore1
            strFile32 = strEEV01h & "\" & strSG3MBXStore2
            strFile33 = strEEV01h & "\" & strSG3MBXStore3
            strFile34 = strEEV01h & "\" & strSG3MBXStore4

                  strSize31 = FileLen(strFile31)
                  strSize32 = FileLen(strFile32)
                  strSize33 = FileLen(strFile33)
                  strSize34 = FileLen(strFile34)

      strEEV01i = "\\cdc01eev01\i$\EXCHSRVR\MDBDATA"
      strSG1MBXStore1 = "SG1MBXStore1.edb"

            strFile41 = strEEV01i & "\" & strSG4MBXStore1
            strFile42 = strEEV01i & "\" & strSG4MBXStore2
            strFile43 = strEEV01i & "\" & strSG4MBXStore3
            strFile44 = strEEV01i & "\" & strSG4MBXStore4

                  strSize41 = FileLen(strFile21)
                  strSize42 = FileLen(strFile22)
                  strSize43 = FileLen(strFile23)
                  strSize44 = FileLen(strFile24)

      ' Research changing from Bytes to Gigabytes

      'Storage Group 1
      objFile.WriteLine strEEV01f & "," & strSG1MBXStore1 & "," & Format(strSize11, "#,##0")
      objFile.WriteLine strEEV01f & "," & strSG1MBXStore2 & "," & Format(strSize12, "#,##0")
      objFile.WriteLine strEEV01f & "," & strSG1MBXStore3 & "," & Format(strSize13, "#,##0")
      objFile.WriteLine strEEV01f & "," & strSG1MBXStore4 & "," & Format(strSize14, "#,##0")

      'Storage Group 2
      objFile.WriteLine strEEV01g & "," & strSG2MBXStore1 & "," & Format(strSize21, "#,##0")
      objFile.WriteLine strEEV01g & "," & strSG2MBXStore2 & "," & Format(strSize22, "#,##0")
      objFile.WriteLine strEEV01g & "," & strSG2MBXStore3 & "," & Format(strSize23, "#,##0")
      objFile.WriteLine strEEV01g & "," & strSG2MBXStore4 & "," & Format(strSize24, "#,##0")

      'Storage Group 3
      objFile.WriteLine strEEV01h & "," & strSG3MBXStore1 & "," & Format(strSize31, "#,##0")
      objFile.WriteLine strEEV01h & "," & strSG3MBXStore2 & "," & Format(strSize32, "#,##0")
      objFile.WriteLine strEEV01h & "," & strSG3MBXStore3 & "," & Format(strSize33, "#,##0")
      objFile.WriteLine strEEV01h & "," & strSG3MBXStore4 & "," & Format(strSize34, "#,##0")

      'Storage Group 4
      objFile.WriteLine strEEV01i & "," & strSG4MBXStore1 & "," & Format(strSize41, "#,##0")
      objFile.WriteLine strEEV01i & "," & strSG4MBXStore2 & "," & Format(strSize42, "#,##0")
      objFile.WriteLine strEEV01i & "," & strSG4MBXStore3 & "," & Format(strSize43, "#,##0")
      objFile.WriteLine strEEV01i & "," & strSG4MBXStore4 & "," & Format(strSize44, "#,##0")Start Free Trial
[+][-]05.20.2005 at 04:50PM PDT, ID: 14049962

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.20.2005 at 05:08PM PDT, ID: 14050032

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.21.2005 at 09:59AM PDT, ID: 14052299

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.21.2005 at 10:11AM PDT, ID: 14052334

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.21.2005 at 10:44AM PDT, ID: 14052409

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.21.2005 at 02:24PM PDT, ID: 14053038

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.21.2005 at 03:23PM PDT, ID: 14053211

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.23.2005 at 07:44AM PDT, ID: 14060585

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.23.2005 at 08:00AM PDT, ID: 14060730

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.23.2005 at 08:04AM PDT, ID: 14060771

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.23.2005 at 08:24AM PDT, ID: 14060983

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.23.2005 at 08:57AM PDT, ID: 14061334

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Visual Basic Programming
Tags: size, file, get
Sign Up Now!
Solution Provided By: egl1044
Participating Experts: 2
Solution Grade: B
 
 
[+][-]05.23.2005 at 10:52AM PDT, ID: 14062324

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32