+ Reply to Thread
Results 1 to 4 of 4

Generate file list with name, date, size, etc

  1. #1
    Registered User
    Join Date
    06-07-2013
    Location
    Dallas, TX
    MS-Off Ver
    Office 2010
    Posts
    5

    Generate file list with name, date, size, etc

    I have a folder containing about 100,000 files and subfolders. Approximately 20% of the files are duplicates. I would like to create a list of all the files with some details so that I can sort through and identify which ones are duplicates, then create a batch file to delete them. Does anyone know how to get a file list with additional details, like size, modified date, etc, into an excel format?

  2. #2
    Forum Contributor
    Join Date
    08-02-2012
    Location
    Pune
    MS-Off Ver
    Office 365 (Win 10)
    Posts
    489

    Cool Re: Generate file list with name, date, size, etc

    List of files in a folder.xlsmHow about this?
    Last edited by akhileshgs; 06-10-2013 at 05:27 AM.

  3. #3
    Forum Contributor
    Join Date
    08-02-2012
    Location
    Pune
    MS-Off Ver
    Office 365 (Win 10)
    Posts
    489

    Thumbs up Re: Generate file list with name, date, size, etc

    This will give you the file names only in a folder.
    I think the earlier attachment will be better for your need
    PHP Code: 
    Sub ListAllFile()
         
        
    Dim objFSO As Object
        Dim objFolder 
    As Object
        Dim objFile 
    As Object
        Dim ws 
    As Worksheet
         
        Set objFSO 
    CreateObject("Scripting.FileSystemObject")
        
    Set ws Worksheets("Sheet2")

         
         
    'Get the folder object associated with the directory
        Set objFolder = objFSO.GetFolder("D:\")
        ws.Cells(1, 1).Value = "The files found in " & objFolder.Name & "are:"
         
         '
    Loop through the Files collection
        
    For Each objFile In objFolder.Files
            ws
    .Cells(ws.UsedRange.Rows.Count 11).Value objFile.Name
        Next
         
         
    'Clean up!
        Set objFolder = Nothing
        Set objFile = Nothing
        Set objFSO = Nothing
         
    End Sub 

  4. #4
    Registered User
    Join Date
    06-07-2013
    Location
    Dallas, TX
    MS-Off Ver
    Office 2010
    Posts
    5

    Re: Generate file list with name, date, size, etc

    Worked like a charm, thanks akhileshgs!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1