file mapping

Acrowebat

New Member
Joined
Dec 3, 2012
Messages
2
I'm in the process of mapping about 10 years worth of files. I want to build a simple flow chart to visually represent all the pathways (for example P Drive: Human Resources: Admin: Letters: Letter 1, Letter 2, Letter 3 etc).

Does anyone out there know if there's a way the file menu can be copied into Excel??
 

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.
that would have been perfect but IT wouldn't give me permission to download. Thanks for the suggestion though.
 
Upvote 0
There was a script on the link, which captures the information you wanted.

Code:
Sub GetFilesInFolder(SourceFolderName As String)     
'--- For Example:Folder Name= "D:\Folder Name\"   </SPAN>
  
Dim FSO As Scripting.FileSystemObject   </SPAN>
Dim SourceFolder As Scripting.folder, SubFolder As Scripting.folder   </SPAN>
Dim FileItem As Scripting.File   </SPAN>
  
    Set FSO = New Scripting.FileSystemObject   </SPAN>
    Set SourceFolder = FSO.GetFolder(SourceFolderName)   </SPAN>
  
    '--- This is for displaying, whereever you want can be configured   </SPAN>
  
    r = 14   
    For Each FileItem In SourceFolder.Files   </SPAN>
        Cells(r, 2).Formula = r - 13   
        Cells(r, 3).Formula = FileItem.Name   
        Cells(r, 4).Formula = FileItem.Path   
        Cells(r, 5).Formula = FileItem.Size   
        Cells(r, 6).Formula = FileItem.Type   
        Cells(r, 7).Formula = FileItem.DateLastModified   
        Cells(r, 8).Formula = "=HYPERLINK(""" & FileItem.Path & """,""" & "Click Here to Open" & """)"   </SPAN>
  
        r = r + 1   ' next row number   </SPAN>
    Next FileItem   </SPAN>
  
    Set FileItem = Nothing  </SPAN>
    Set SourceFolder = Nothing  </SPAN>
    Set FSO = Nothing 
End Sub

There is one for subfolders too.
 
Upvote 0

Forum statistics

Threads
1,215,757
Messages
6,126,695
Members
449,331
Latest member
smckenzie2016

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top