+ Reply to Thread
Results 1 to 3 of 3

List of Files in A Directory

  1. #1
    JaneC
    Guest

    List of Files in A Directory

    Hi,

    I am wanting to get a list of files in a certain folder displayed as a list,
    without me having to manually type them in (There'e about 150 files). It
    doesn't necessarily need to be done in excel, but it would save me ALOT of
    time if I could import the file names into a list.

    Thanks, Jane

  2. #2
    Jim Cone
    Guest

    Re: List of Files in A Directory

    Jane,

    Check out the free Excel add-in "List Files" here...
    http://www.realezsites.com/bus/primitivesoftware

    Jim Cone
    San Francisco, USA


    "JaneC" <[email protected]>
    wrote in message
    Hi,
    I am wanting to get a list of files in a certain folder displayed as a list,
    without me having to manually type them in (There'e about 150 files). It
    doesn't necessarily need to be done in excel, but it would save me ALOT of
    time if I could import the file names into a list.

    Thanks, Jane

  3. #3
    vezerid
    Guest

    Re: List of Files in A Directory

    Jane,
    the following macro will list the contents of folder in column A:A
    starting from A1. Modify to suit:

    Sub ListFiles()
    mypath = "D:\Excel Notes\*.*" 'Modify to suit
    i = 0 'Set i to row-1 of the starting row of the data.
    myfile = Dir(mypath, vbNormal)
    While myfile <> ""
    i = i + 1
    Cells(i, 1) = myfile 'Modify 1 here to the column you want the
    list
    myfile = Dir
    Wend
    End Sub

    HTH
    Kostis Vezerides


+ 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