Results 1 to 10 of 10
  1. #1
    New Lounger
    Join Date
    Dec 2009
    Location
    New Jersey
    Posts
    11
    Thanks
    1
    Thanked 0 Times in 0 Posts

    How can I obtain all displayed info on files from Windows Explorer?

    I would like to find a way to obtain the length (playing time) of mp3 files and have them stored in a text file.

    In other words, when using Windows Explorer to show mp3 files in detail view, I can turn on the LENGTH column (as well as many others) so that the playing time displays along with the file name, size, etc.

    I want the length values along with the filenames (and other columns) 'read' from the WE window and saved in a text file.

    It is easy to obtain the basic info by doing a DIR in DOS mode, etc. but I can't find a way to access all the other column info.

    Is there a built in way to export the WE data? I can't even find a third party program to do this.

    I believe NirSoft's SysExporter used to be able to do this but his site now states "Starting from Windows 7, Microsoft changed the control that is used for displaying files and folder in Explorer window, and thus SysExporter cannot grab the data from Explorer windows on Windows 7."

    Any ideas appreciated! Thanks

  2. Get our unique weekly Newsletter with tips and techniques, how to's and critical updates on Windows 7, Windows 8, Windows XP, Firefox, Internet Explorer, Google, etc. Join our 480,000 subscribers!

    Excel 2013: The Missing Manual

    + Get this BONUS — free!

    Get the most of Excel! Learn about new features, basics of creating a new spreadsheet and using the infamous Ribbon in the first chapter of Excel 2013: The Missing Manual - Subscribe and download Chapter 1 for free!

  3. #2
    Super Moderator RetiredGeek's Avatar
    Join Date
    Mar 2004
    Location
    Manning, South Carolina
    Posts
    6,194
    Thanks
    201
    Thanked 785 Times in 719 Posts
    Here's how:
    1. Display a music folder in Explorer.
    2. Right-Click on the headings line, e.g. Name, Date Modified, Type, etc.
    3. Click on More...
    4. Scroll down to Length and check it.
    5. Click OK.

    Attached Images Attached Images
    May the Forces of good computing be with you!

    RG

    VBA Rules!

    My Systems: Desktop Specs
    Laptop Specs


  4. #3
    Super Moderator
    Join Date
    Jun 2011
    Location
    New England
    Posts
    2,774
    Thanks
    83
    Thanked 340 Times in 307 Posts
    Quote Originally Posted by RetiredGeek View Post
    Here's how:
    1. Display a music folder in Explorer.
    2. Right-Click on the headings line, e.g. Name, Date Modified, Type, etc.
    3. Click on More...
    4. Scroll down to Length and check it.
    5. Click OK.
    How to display on screen was already known. The question was how to get that information into a text file.

    Bruce

  5. #4
    5 Star Lounger
    Join Date
    Dec 2009
    Location
    Slough, Berkshire UK
    Posts
    918
    Thanks
    52
    Thanked 52 Times in 50 Posts
    Maybe you could use the 'snípping tool' once it is displayed on screen and copy paste it into a word doc.

  6. #5
    Lounge VIP
    Join Date
    Apr 2011
    Location
    Scotland
    Posts
    1,168
    Thanks
    44
    Thanked 134 Times in 115 Posts
    Use a scripting language of your choice to pull the attributes of each file.

    Here's a couple of articles that discuss something very similar using VB Script:

    http://www.winfrastructure.net/artic...es-in-VBScript and http://www.ehow.com/how_12168954_mp3...-vbscript.html.

    You should be able to see how they work and modify to your needs. There are loads of tutorials and other resources for VB Script on the web: there is even a section here in the Lounge.

  7. The Following User Says Thank You to Tinto Tech For This Useful Post:

    TTTWSL (2012-01-06)

  8. #6
    Super Moderator RetiredGeek's Avatar
    Join Date
    Mar 2004
    Location
    Manning, South Carolina
    Posts
    6,194
    Thanks
    201
    Thanked 785 Times in 719 Posts
    Bruce,

    Here's a PowerShell command that will do the job on a single directory.
    dir "G:\BEKDocs\My Music\Billy Joel\Piano Man\*.*" | Select-object Name, @{Expression={ '{0:#,00.00}' -f ($_.length/16000/60)};Label="Duration"}

    Name Duration
    ---- --------
    01 Travelin' Prayer.wma 04.31
    02 Piano Man.wma 05.70
    03 Ain't No Crime.wma 03.35
    04 You're My Home.wma 03.27
    05 The Ballad of Billy the Kid.wma 05.80
    06 Worse Comes to Worst.wma 03.31
    07 Stop in Nevada.wma 03.96
    08 If I Only Had the Words (To Tell You).wma 03.62
    09 Somewhere Along the Line.wma 03.40
    10 Captain Jack.wma 07.36


    It is interesting that the times calculated here using the Filesize and Bit Rate are greater than those Windows calculates which are greater than shown on the back of the CD case, go figure.

    BTW: The results can be sent to a file by appending a > filename to the command.
    Or appending >> filename to append subsequent directories to the same file. Of course much more can be done like making PowerShell parse through your entire Music library but I don't have the time to do that right now. Hope this helps.

    Another Bruce!
    May the Forces of good computing be with you!

    RG

    VBA Rules!

    My Systems: Desktop Specs
    Laptop Specs


  9. #7
    New Lounger
    Join Date
    Dec 2009
    Location
    New Jersey
    Posts
    11
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Tinto Tech -

    Thank you for this information. I was hoping for a super-secret DIR flag, but I did a quick test which worked and am certain I can study and scrape together the VBS code that will get me the info I want into a text file.

    The following post about PowerShell looked interesting, but I don't have it installed, nor do I want to go through that type of effort so this is great. Thanks again.

  10. #8
    Administrator
    Join Date
    Mar 2001
    Location
    St Louis, Missouri, USA
    Posts
    20,543
    Thanks
    1
    Thanked 614 Times in 550 Posts
    With Windows 7 you should have PowerShell already installed. Try going to Start | All Programs | Accessories | Windows Powershell.

    Joe

  11. The Following User Says Thank You to JoeP517 For This Useful Post:

    CLiNT (2012-01-09)

  12. #9
    New Lounger
    Join Date
    Dec 2009
    Location
    New Jersey
    Posts
    11
    Thanks
    1
    Thanked 0 Times in 0 Posts

    You are correct, I DO have PowerShell!

    Thanks for that heads up - I never noticed. Probably because I know nothing about it whereas I've written tiny VBS scripts before. If I can figure out how to get PowerShell code to run, at least I can use prewritten routines I find like the one above.

    Thank you!

  13. #10
    Super Moderator CLiNT's Avatar
    Join Date
    Dec 2009
    Location
    California & Arizona
    Posts
    5,446
    Thanks
    128
    Thanked 495 Times in 455 Posts

Tags for this Thread

Posting Permissions

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