Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi all! We have been experiencing an issue on site where threads have been missing the latest postings. The platform host Vanilla are working on this issue. A workaround that has been used by some is to navigate back a page or two to re-sync the thread and this will then show latest posts. Thanks, Mike.

Tool to output directory contents to excel ?

  • 21-06-2005 8:54pm
    #1
    Closed Accounts Posts: 3,489 ✭✭✭


    Is there some sort of tool available that will output the contents of a folder (including indented subfolders) to an excel spreadsheet ?

    Say for example using my music folder as an example:

    Column A Column B
    Bruce Springsteen
    Tunnel Of Love
    Greatest Hits
    Bob Dylan
    The Best of Bob Dylan

    Etc


Comments

  • Registered Users, Registered Users 2 Posts: 68,317 ✭✭✭✭seamus


    iMax wrote:
    Is there some sort of tool available that will output the contents of a folder (including indented subfolders) to an excel spreadsheet ?

    Say for example using my music folder as an example:

    Column A Column B
    Bruce Springsteen
    Tunnel Of Love
    Greatest Hits
    Bob Dylan
    The Best of Bob Dylan

    Etc

    I can't think of any, but it wouldn't be too tough. You can get all the directories and their subdirectories output to a text file through the command prompt.

    I'll walk you through an example. My music is stored on my Z:\ (network drive).

    From the command prompt, I went into the Z:\ and ran
    dir /s /b /ad > c:\musicfile.txt

    "dir" lists the contents of a directory
    The "/s" tells it to traverse all directories and subdirectories
    The "/b" tells it to only output the bare info, i.e. no modified dates, sizes, etc/
    "/ad" tells it to only list Directories.
    "> c:\musicfile.txt" makes it output the result to that file, which I've attached for this example :)

    Now, we need to strip out anything which isn't necessary. For me, it's the bit at the start - the "Z:\". So we open the file in notepad, go to Edit > Replace, put "Z:\" in the Find What field, and leave the Replace With field empty. Hit Replace All and it strips out the prefix.

    Now we save the file, and open up Excel. Go to Data > Import External Data > Import Data. Change the files of type to all files, and select your musicfie.txt.
    This will open the Import Wizard. Leave the type as delimited and hit next. Untick the tab delimiter, tick the Other delimiter, and put a backslash in the text field, and hit next. Hit Finish. Hit OK.

    It outputs something close to what you want (that you can work with anyway), for example, what I got is the second attachment.

    :)


  • Closed Accounts Posts: 3,489 ✭✭✭iMax


    Thanks dude


Advertisement