Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,290
Default Getting number of files within a sub-folder and its size

HP,
You might want to give the free Excel add-in "List Files" a try.
It can look for *.wma files within a folder and sub-folders.
It will list the file name, path and folder size among other info.
Download from (no registration required)...
http://www.realezsites.com/bus/primitivesoftware
--
Jim Cone
San Francisco, USA


"Hari"
wrote in message
Hi,
I have lots of files within numerous different folders.
What I want to do is know the number of files in each sub-folder folder
and the total size of each folder .
For example if my root folder is Folder1 and if it has 10 sub-folders
Folders. Then I want to know the size of each of those 10 sub-folders
and the number of *.wma files within each sub-folder.
I use the following (zliched) program in case I need to do some file
manipulation like opening or list of files etc. I dont know how to
modify this code to do the above process.

Sub ListRootFoldersWithinaPath()
Dim i As Integer
Dim wbnew As Workbook
Set wbnew = Workbooks.Add
With Application.FileSearch
.NewSearch
.LookIn = UCase("D:\My files")
.SearchSubFolders = True
.FileType = msoFileTypeAllFiles
.Execute
For i = 1 To .FoundFiles.Count
wbnew.Sheets(1).Cells(i, 1).Value = .FoundFiles(i)
Next i
End With
End Sub
Can somebody please guide me.
Regards,
HP
India

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 46
Default Getting number of files within a sub-folder and its size


Jim Cone wrote:
HP,
You might want to give the free Excel add-in "List Files" a try.
It can look for *.wma files within a folder and sub-folders.
It will list the file name, path and folder size among other info.
Download from (no registration required)...
http://www.realezsites.com/bus/primitivesoftware
--


Thanks, I have downloaded it and would try out.

Regards,
HP
India

Jim Cone
San Francisco, USA


"Hari"
wrote in message
Hi,
I have lots of files within numerous different folders.
What I want to do is know the number of files in each sub-folder folder
and the total size of each folder .
For example if my root folder is Folder1 and if it has 10 sub-folders
Folders. Then I want to know the size of each of those 10 sub-folders
and the number of *.wma files within each sub-folder.
I use the following (zliched) program in case I need to do some file
manipulation like opening or list of files etc. I dont know how to
modify this code to do the above process.

Sub ListRootFoldersWithinaPath()
Dim i As Integer
Dim wbnew As Workbook
Set wbnew = Workbooks.Add
With Application.FileSearch
.NewSearch
.LookIn = UCase("D:\My files")
.SearchSubFolders = True
.FileType = msoFileTypeAllFiles
.Execute
For i = 1 To .FoundFiles.Count
wbnew.Sheets(1).Cells(i, 1).Value = .FoundFiles(i)
Next i
End With
End Sub
Can somebody please guide me.
Regards,
HP
India


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Path and Number of files in a folder. - Pass to Macro. Richard Excel Discussion (Misc queries) 1 December 21st 06 09:20 PM
how can I specific a folder with wildcard criteria and excel will import all the correct files in that folder? Raven Excel Discussion (Misc queries) 1 January 24th 06 03:28 PM
how can I specific a folder with wildcard criteria and excel will import all the correct files in that folder? Raven[_2_] Excel Programming 1 January 24th 06 04:23 AM
Number of files in a folder [email protected] Excel Programming 15 January 19th 06 10:02 AM
Checking the number of files in a folder using VBA Bhupinder Rayat Excel Programming 5 February 7th 05 03:43 PM


All times are GMT +1. The time now is 08:07 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"