copy file names from explorer to paste into excel

Anonymous
2009-06-30T14:00:06+00:00

I am trying to copy a long list of file names in file explorer and paste them into excel so I can keep track of file status, is there an easy way to do this?

Microsoft 365 and Office | Excel | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments
Answer accepted by question author
Hal Hostetler MVP-Outlook 12,011 Reputation points MVP Volunteer Moderator
2009-06-30T22:52:55+00:00

Thereare a number of ways to print Directory listings detailed here:

Print directory - Vista Forums

Hal

-- 

Hal Hostetler, CPBE

Senior Engineer/MIS -- MS MVP-Print/Imaging -- WA7BGX

www.kvoa.com -- KVOA Television, Tucson, AZ. 

Live at Hot Licks - www.badnewsbluesband.com

Was this answer helpful?

10+ people found this answer helpful.
0 comments No comments

45 additional answers

Sort by: Oldest
  1. Anonymous
    2013-06-01T17:46:48+00:00

    I've seen lots of complicated ways to do this in this blog but the the easiest and best has to be to use the file navigation facility built into browsers OTHER THAN Internet Explorer.

    Here is a fuller 'how to' explanation: 

    Install Firefox browser if not already available.

    Enter the appropriate disc drive into the address bar e.g C:\ (you can also use the full folder path in reverse slash format e.g. C:\Users\myname\Documents). Navigate down to the the folder required for copy.

    A nice neat file list with size and date last modified is displayed.

    CTRL A to highlight; CTRL C to copy.

    Paste Special into Excel; select Text option (not HTML!); adjust (widen) column sizes.

    There you have it;  the list can be sorted in Excel (e.g. by file name or date or size) but not in Firefox which always lists in alphabetical order.

    Notes: 

    1.  I've not tried it but should also work in Opera and Chrome;  but NOT Microsoft Internet Explorer which unhelpfully takes you back to Windows Explorer.

    2.  It may be easier to navigate to the folder using Windows Explorer first (i.e. the file directory accessed from 'Computer').  Then copy the path from the navigate bar and paste to Firefox. If the bar displays in arrow seperated format, convert it to slash separated format by clicking on the folder icon at the start of the Windows Explorer navigate bar. 

    3: To remove 'File:' from the start of each file name in the Excel listing do Find and Select; Replace; Find what: "File:"; Replace with nothing; Replace All.

    No credit to me for working this out - I found the solution somewhere when I had the same problem.

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2013-06-04T19:56:24+00:00

    How do you copy this list in CMD?

    I used PowerShell to do it... Ctrl-C seemed to work like 1 out of 7 tries.. not sure why it doesn't always work.

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2013-06-04T23:58:38+00:00

    You could always write a VBA procedure.

    Sub DirList()

        Dim FSO As Object

        Dim FF As Object

        Dim F As Object

        Dim R As Range

        Dim FullName As Boolean

        FullName = True '<<< #1 True to include directory name, False for name only.

        Set R = Range("A1") '<<< #2 Start cell of file list

        Set FSO = CreateObject("Scripting.FileSystemObject")

        Set FF = FSO.getfolder("G:\A") '<<< #3 Change to folder name

        For Each F In FF.Files

            If FullName = True Then

                R.Value = F.Path

            Else

                R.Value = F.Name

            End If

            Set R = R(2, 1)

        Next F

    End Sub

    Change the line marked with <<< #1 to True to include the folder name or False to include only the file name (no path info). Change line <<< #2 to the cell in which the list of files is to begin. Change the line marked with <<< #3 to the folder name whose files you want to list.

    I have an add-in that does this and much, much more.  See http://www.cpearson.com/excel/FolderTree.aspx for details.

    Was this answer helpful?

    0 comments No comments
  4. Anonymous
    2013-09-06T17:15:22+00:00

    Thank You So Much... Broxi I appreciate..

    I am doing video project in .net .. and it helps me to save the correct video file name for processing..

    Thanks DON

    Was this answer helpful?

    0 comments No comments