Gmail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Message from discussion Problem with recursion and objfolder.size
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Jeremy  
View profile  
 More options Nov 5 2009, 5:41 am
Newsgroups: microsoft.public.scripting.vbscript
From: Jeremy <Jer...@discussions.microsoft.com>
Date: Wed, 4 Nov 2009 21:41:02 -0800
Local: Thurs, Nov 5 2009 5:41 am
Subject: Problem with recursion and objfolder.size
1l  The purpose of the following script is to return attributes of subfolders
into an Excel spread sheet.  The way it is now, it only gives the attirbutes
for the root folder.  I know I need to add a for...next.  I just don't know
what to put after the for.

2.  I get a permissions error with the objfolderf.size line, but not with
other lines.  

Any suggestions please?

--------------------------------
'Script to get info on sub folders

'Section 1 - Excel Stuff
Set objExcel = CreateObject("Excel.Application")
objExcel.Visible = True
objExcel.Workbooks.Add

intRow = 2

objExcel.Cells(1, 1).Value = "Date Created"
objExcel.Cells(1, 2).Value = "Date Last Accessed"
objExcel.Cells(1, 3).Value = "Date Last Modified"
objExcel.Cells(1, 4).Value = "Name"
objExcel.Cells(1, 5).Value = "Path"
objExcel.Cells(1, 6).Value = "Size"
objExcel.Cells(1, 7).Value = "Type"

'Section 2 - Find folder Attributes

Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFolder = objFSO.GetFolder("f:\jeremy-data")

'For each objFolder in objFSO.GetFolder

objExcel.Cells(intRow, 1).Value = objFolder.DateCreated
objExcel.Cells(intRow, 2).Value = objFolder.DateLastAccessed
objExcel.Cells(intRow, 3).Value = objFolder.DateLastModified
objExcel.Cells(intRow, 4).Value = objFolder.Name
objExcel.Cells(intRow, 5).Value = objFolder.Path
objExcel.Cells(intRow, 6).Value = objFolder.Size
objExcel.Cells(intRow, 7).Value = objFolder.Type

'Next


    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2010 Google