Page 1 of 2 12 LastLast
Results 1 to 15 of 21
  1. #1
    Star Lounger
    Join Date
    Dec 2009
    Location
    Medway Ma. USA
    Posts
    77
    Thanks
    1
    Thanked 0 Times in 0 Posts

    convert folder listings to excel

    I have a folder full of songs and when I open it in detail view how do I copy it and move it into Excel? There are 8 columns of data in the music folder and I need to add or change info and doing it with each .mp3 files properties would take much longer than being able to click on a cell and modify it. I am running Win XP and Office 2000.

    Urge

  2. #2
    WS Lounge VIP sdckapr's Avatar
    Join Date
    Jul 2002
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    11,225
    Thanks
    14
    Thanked 342 Times in 335 Posts
    Can the code in the threads at
    http://windowssecrets.com/forums/sho...ata-(Excel-XP) and/or
    http://windowssecrets.com/forums/sho...Code-(XL-2003) be adapted to what you need?

    Steve

  3. #3
    Star Lounger
    Join Date
    Dec 2009
    Location
    Medway Ma. USA
    Posts
    77
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Steve wrote...
    Can the code in the threads at ...be adapted to what you need?
    I don't know, I am unable to access either page "problem loading page"

    Urge

  4. #4
    Gold Lounger Maudibe's Avatar
    Join Date
    Aug 2010
    Location
    Pa, USA
    Posts
    2,629
    Thanks
    114
    Thanked 644 Times in 588 Posts
    Urge,

    Here is some code that will let you browse to a music folder then import the file names along with up to 40 file attributes for each. The variable "I" controls the column as well as the attribute number which refers to an attribute. See the list below. Note: This was created in Win 7 and Office 2010.

    Update: I added an office 97-2003 compatible version

    HTH,
    Maud

    Music1.png

    music.png



    Code:
    Public Sub MusicData()
    On Error Resume Next
    Application.ScreenUpdating = False
    'DECLARE AND SET VARIABLES
    Dim ShellApp As Object
    Set ShellApp = CreateObject("Shell.Application").BrowseForFolder(0, "Please choose a folder", 0, OpenAt)
    Path = ShellApp.self.Path
    Set ShellApp = Nothing
    Dim File As Variant
    Dim iRow As Integer
    Dim musicfolder
    Set ShellApp = CreateObject("Shell.Application")
    Set musicfolder = ShellApp.Namespace(Path & "\")
    '-------------------------------------------------
    'GET FILE INFORMATION
    iRow = 4
    For Each File In musicfolder.Items
        For I = 1 To 41  'I=COLUMN, I-1=ATTRIBUTE NUMBER
            Cells(iRow, I).Value = musicfolder.GetDetailsOf(File, I - 1)
        Next I
        iRow = iRow + 1
    Next
    '-------------------------------------------------
    'AUTOFIT COLUMNS
    Columns("A:AO").EntireColumn.AutoFit
    Application.ScreenUpdating = True
    End Sub


    0 Name
    1 Size
    2 Item type
    3 Date modified
    4 Date created
    5 Date accessed
    6 Attributes
    7 Offline status
    8 Offline availability
    9 Perceived type
    10 Owner
    11 Kind
    12 Date taken
    13 Contributing artists
    14 Album
    15 Year
    16 Genre
    17 Conductors
    18 Tags
    19 Rating
    20 Authors
    21 Title
    22 Subject
    23 Categories
    24 Comments
    25 Copyright
    26 #
    27 Length
    28 Bit rate
    29 Protected
    30 Camera model
    31 Dimensions
    32 Camera maker
    33 Company
    34 File description
    35 Program name
    36 Duration
    37 Is online
    38 Is recurring
    39 Location
    40 Optional attendee addresses
    Attached Files Attached Files
    Last edited by Maudibe; 2013-10-14 at 23:18. Reason: Added Excel 2003 version

  5. The Following 2 Users Say Thank You to Maudibe For This Useful Post:

    motivated (2013-10-15),RetiredGeek (2013-10-14)

  6. #5
    Super Moderator RetiredGeek's Avatar
    Join Date
    Mar 2004
    Location
    Manning, South Carolina
    Posts
    9,433
    Thanks
    371
    Thanked 1,456 Times in 1,325 Posts
    Maudibe,

    Great Code! Works for Pictures also. I'll be playing with this.
    Last edited by RetiredGeek; 2013-10-14 at 23:43.
    May the Forces of good computing be with you!

    RG

    PowerShell & VBA Rule!

    My Systems: Desktop Specs
    Laptop Specs

  7. The Following 2 Users Say Thank You to RetiredGeek For This Useful Post:

    Maudibe (2013-10-14),motivated (2013-10-15)

  8. #6
    Gold Lounger Maudibe's Avatar
    Join Date
    Aug 2010
    Location
    Pa, USA
    Posts
    2,629
    Thanks
    114
    Thanked 644 Times in 588 Posts
    Thanks RG. I'll have to test that one as well but it should work with all types of files.

    P.S. I like your new profile pic. From the movie, "Retired Geek and the Temple of Doom"
    Last edited by Maudibe; 2013-10-15 at 00:18.

  9. #7
    WS Lounge VIP sdckapr's Avatar
    Join Date
    Jul 2002
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    11,225
    Thanks
    14
    Thanked 342 Times in 335 Posts
    I don't know what the problem is, I just tried the links and they work...

    Steve

  10. #8
    Star Lounger
    Join Date
    Dec 2009
    Location
    Medway Ma. USA
    Posts
    77
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Thanks to everyone for looking and offering suggestions. OK, now I have code, what do I do with it? where do I insert it? I can alter it yes/no? If I want more or different categories ...

    ActiveCell.Offset(lngRow, 1) = .Title
    ActiveCell.Offset(lngRow, 2) = .Artist
    ActiveCell.Offset(lngRow, 3) = .Album
    ActiveCell.Offset(lngRow, 4) = .Year
    ActiveCell.Offset(lngRow, 5) = .Genre
    ActiveCell.Offset(lngRow, 6) = .Comment
    I can just add to or modify these?

    Urge

  11. #9
    Super Moderator RetiredGeek's Avatar
    Join Date
    Mar 2004
    Location
    Manning, South Carolina
    Posts
    9,433
    Thanks
    371
    Thanked 1,456 Times in 1,325 Posts
    Quote Originally Posted by Maudibe View Post
    Thanks RG. I'll have to test that one as well but it should work with all types of files.

    P.S. I like your new profile pic. From the movie, "Retired Geek and the Temple of Doom"
    Maudibe,

    Actually, it is from or recent Moroccan vacation. We spent one night in tents in the Sahara riding camels up on the high dunes to watch the sunset then walking up the dunes in the morning to watch the sunrise. So it would be more like "Raiders of the Lost Ark" or my favorite SF novel Dune!
    May the Forces of good computing be with you!

    RG

    PowerShell & VBA Rule!

    My Systems: Desktop Specs
    Laptop Specs

  12. #10
    WS Lounge VIP sdckapr's Avatar
    Join Date
    Jul 2002
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    11,225
    Thanks
    14
    Thanked 342 Times in 335 Posts
    my favorite SF novel Dune
    That outfit does not look anything like a stillsuit. I don't see how you would keep your sweat from evaporating into the environment...

    Steve

  13. #11
    Super Moderator RetiredGeek's Avatar
    Join Date
    Mar 2004
    Location
    Manning, South Carolina
    Posts
    9,433
    Thanks
    371
    Thanked 1,456 Times in 1,325 Posts
    Quote Originally Posted by sdckapr View Post
    That outfit does not look anything like a stillsuit. I don't see how you would keep your sweat from evaporating into the environment...
    Steve
    Steve,

    You can't see it through my shield generator.
    May the Forces of good computing be with you!

    RG

    PowerShell & VBA Rule!

    My Systems: Desktop Specs
    Laptop Specs

  14. #12
    WS Lounge VIP sdckapr's Avatar
    Join Date
    Jul 2002
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    11,225
    Thanks
    14
    Thanked 342 Times in 335 Posts
    You can't see it through my shield generator
    With all the laser-pointers around, I don't see why you aren't afraid to wear it. All it would take is one stray beam...

    Steve

  15. #13
    Super Moderator RetiredGeek's Avatar
    Join Date
    Mar 2004
    Location
    Manning, South Carolina
    Posts
    9,433
    Thanks
    371
    Thanked 1,456 Times in 1,325 Posts
    Steve,

    Ok, you have established your Sci-Fi cred!

    It's that slow blade that I worry about...especially in the back!
    May the Forces of good computing be with you!

    RG

    PowerShell & VBA Rule!

    My Systems: Desktop Specs
    Laptop Specs

  16. #14
    Gold Lounger Maudibe's Avatar
    Join Date
    Aug 2010
    Location
    Pa, USA
    Posts
    2,629
    Thanks
    114
    Thanked 644 Times in 588 Posts
    Sale on Weirding Modules. 10% off.... Today only!!

  17. #15
    Super Moderator RetiredGeek's Avatar
    Join Date
    Mar 2004
    Location
    Manning, South Carolina
    Posts
    9,433
    Thanks
    371
    Thanked 1,456 Times in 1,325 Posts
    Ok Guys I think it's time to lay off the Spice! We're getting a bit off topic.
    May the Forces of good computing be with you!

    RG

    PowerShell & VBA Rule!

    My Systems: Desktop Specs
    Laptop Specs

Page 1 of 2 12 LastLast

Posting Permissions

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