ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   folder hierarchy transfer to excel sheet (https://www.excelbanter.com/excel-programming/422614-folder-hierarchy-transfer-excel-sheet.html)

nerohnze

folder hierarchy transfer to excel sheet
 
I need help to copy a large folder hierarchy to excel sheet, available to be
expanded with "+"(grouping) function and including the files in the folder.

Is this possible with programming or with something else?

Thanks for help

joel

folder hierarchy transfer to excel sheet
 
I you just lookinhg for the file names or do you want to open the files. Do
you need other info beside the filename like last saved date?

"nerohnze" wrote:

I need help to copy a large folder hierarchy to excel sheet, available to be
expanded with "+"(grouping) function and including the files in the folder.

Is this possible with programming or with something else?

Thanks for help


nerohnze

folder hierarchy transfer to excel sheet
 
Hi Joel,
No, i don't need to open the files or see the last saved dates.

"Joel" wrote:

I you just lookinhg for the file names or do you want to open the files. Do
you need other info beside the filename like last saved date?

"nerohnze" wrote:

I need help to copy a large folder hierarchy to excel sheet, available to be
expanded with "+"(grouping) function and including the files in the folder.

Is this possible with programming or with something else?

Thanks for help


joel

folder hierarchy transfer to excel sheet
 
Do you need subolders or just the main directory.

"nerohnze" wrote:

Hi Joel,
No, i don't need to open the files or see the last saved dates.

"Joel" wrote:

I you just lookinhg for the file names or do you want to open the files. Do
you need other info beside the filename like last saved date?

"nerohnze" wrote:

I need help to copy a large folder hierarchy to excel sheet, available to be
expanded with "+"(grouping) function and including the files in the folder.

Is this possible with programming or with something else?

Thanks for help


nerohnze

folder hierarchy transfer to excel sheet
 
I also need the subfolders, every folder may have a different level
hierarchy. Also, if possible, i need the files in these folders or subfolders.
Thanks in advance for support.

"Joel" wrote:

Do you need subolders or just the main directory.

"nerohnze" wrote:

Hi Joel,
No, i don't need to open the files or see the last saved dates.

"Joel" wrote:

I you just lookinhg for the file names or do you want to open the files. Do
you need other info beside the filename like last saved date?

"nerohnze" wrote:

I need help to copy a large folder hierarchy to excel sheet, available to be
expanded with "+"(grouping) function and including the files in the folder.

Is this possible with programming or with something else?

Thanks for help


joel

folder hierarchy transfer to excel sheet
 
The program below will search the entire C:\ drive and get the name, size,
and last modified date. I had the code in my archieves. You can change
strFolder to anything you like for example

strFolder = "C:\temp"
strFolder = "D:\joel\myspace"




Dim RowNumber
Sub GetFolderSize()

strFolder = "C:"
RowNumber = 1

Set fso = CreateObject _
("Scripting.FileSystemObject")
Set folder = _
fso.GetFolder(strFolder)

Sheets(1).Cells(RowNumber, 1) = strFolder + "\"
Sheets(1).Cells(RowNumber, 2) = folder.Size
RowNumber = RowNumber + RowNumber

Call GetSubFolder(strFolder + "\")
End Sub

Sub GetSubFolder(strFolder)
Set fso = CreateObject _
("Scripting.FileSystemObject")

Set folder = _
fso.GetFolder(strFolder)

If folder.subfolders.Count 0 Then
For Each sf In folder.subfolders
On Error GoTo 100
Call GetSubFolder(strFolder + sf.Name + "\")
100 Next sf
End If
'folder size in bytes
On Error GoTo 200
For Each fl In folder.Files
Sheets(1).Cells(RowNumber, 3) = fl.DateLastModified
Sheets(1).Cells(RowNumber, 2) = fl.Size
Sheets(1).Cells(RowNumber, 1) = strFolder & fl.Name
RowNumber = RowNumber + 1
Next fl

200 On Error GoTo 0

End Sub


Jim Cone[_2_]

folder hierarchy transfer to excel sheet
 
My List Files Excel add-in generates a file/folder list with a grouping
and hyperlink option. All done with a few button clicks.
The trial version is available to those responding (via email) who
provide a real name and geographic location.
Remove XXX from my email address.
--
Jim Cone
Portland, Oregon USA
XX



"nerohnze"

wrote in message
I need help to copy a large folder hierarchy to excel sheet, available to be
expanded with "+"(grouping) function and including the files in the folder.
Is this possible with programming or with something else?
Thanks for help


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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com