Hi Shekhar,

Thanks for your reply.

Your logic is only for files & folder only.

But, My requirement is  to count all the items in that folder. I don't want
to count only files or folders.

I am looking for generic code which give total number of items in that
folder.

I don't want care what the item will be. It may be file or sub folder or
zip file or any setup file ....anything.

Regards,
Abhijit Biradar
+91-7875563598
On 4 Jun 2014 13:36, "shekhar bhakat" <[email protected]> wrote:

> Hi Abhijeet,
>
> Please find the following code which might be help you.
>
> ''Total Item count in folder
>
> set of=CreateObject("Scripting.filesystemobject")
>
> set oFolder=of.getfolder("C:\Users\chandra_bhakat\Desktop\Vb scripting")
>
> set oSubFolder=oFolder.subfolders
>
> msgbox oFolder.files.count rem to get the total no of files in that
> particular folder
>
> msgbox oSubFolder.count  rem to get the no of sub folders in a particular
> folder
>
>
> Thanks
> shekhar
>
> On Tuesday, June 3, 2014 3:14:08 PM UTC+5:30, Abhijit Biradar wrote:
>>
>> Hi All,
>>
>> Can any body tell me the logic to count total number of items (files /
>> folders / any kind setup / zip file / image file etc.)  in a folder using
>> vbscript.
>>
>> Thanks in advance.
>>
>> Regards,
>> Abhijit Biradar
>> +91-7875563598
>>
>  --
> --
> You received this message because you are subscribed to the Google
> "QTP - HP Quick Test Professional - Automated Software Testing"
> group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/MercuryQTP?hl=en
>
> ---
> You received this message because you are subscribed to the Google Groups
> "QTP - HP Quick Test Professional - Automated Software Testing" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
You received this message because you are subscribed to the Google
"QTP - HP Quick Test Professional - Automated Software Testing"
group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/MercuryQTP?hl=en

--- 
You received this message because you are subscribed to the Google Groups "QTP 
- HP Quick Test Professional - Automated Software Testing" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to