none
VBScript -GetDetailsOf hangs while accessing mp3 files RRS feed

  • Question

  • I have a VBscript (shown below) to display the extended properties of my *.mp3 files.  For some reason, the program "hangs" after property #6.  It does this on all of the *.mp3 on my filesystem.  I copied the mp3 to a usb drive and ran the same program against that file and it worked (I saw all properties after #6).  Why is the same program hanging on the files on my computer hard drive.  I am running Windows 7 Ultimate 64-bit using the command-line cscript <myscript>.vbs

    Dim arrHeaders(286)
    set objShell = CreateObject("shell.application")
    set objFolder = objShell.NameSpace("C:\Users\Music\Adele")

    For i = 0 to 285
     arrHeaders(i) = objFolder.GetDetailsOf(objFolder.Items, i)
    ' Wscript.Echo i & vbtab & arrHeaders(i)
    Next
    For Each strFileName in objFolder.Items
        For i = 0 to 285
            strValue = objFolder.GetDetailsOf(strFileName, i)
            if strValue <> "" Then
                Wscript.Echo i & ": " & arrHeaders(i)  & ": " & strValue
            End If
        Next
    Next

    Thursday, October 23, 2014 2:03 AM

Answers

  • I have a VBscript (shown below) to display the extended properties of my *.mp3 files.  For some reason, the program "hangs" after property #6.  It does this on all of the *.mp3 on my filesystem.  I copied the mp3 to a usb drive and ran the same program against that file and it worked.

    You did not say where you ran the code after copying the files to a flash disk. On the same PC? On a different PC?

    If it is on the same PC then there could be something wrong with the file system. You should copy the music files to a different folder and/or run chkdsk and/or remove the file that causes the script to hang.

    If it is on a different system then there is something wrong on the original PC. You should test the code using a "clean boot".

    Either way this is not a scripting question because there is nothing wrong with the script itself.

    • Proposed as answer by Frederik Long Saturday, October 25, 2014 5:45 AM
    • Marked as answer by SpankyTravis Sunday, October 26, 2014 11:36 PM
    Thursday, October 23, 2014 6:18 AM

All replies

  • You need to fix your system.  Your question is not a scripting question. 


    ¯\_(ツ)_/¯

    Thursday, October 23, 2014 6:14 AM
  • I have a VBscript (shown below) to display the extended properties of my *.mp3 files.  For some reason, the program "hangs" after property #6.  It does this on all of the *.mp3 on my filesystem.  I copied the mp3 to a usb drive and ran the same program against that file and it worked.

    You did not say where you ran the code after copying the files to a flash disk. On the same PC? On a different PC?

    If it is on the same PC then there could be something wrong with the file system. You should copy the music files to a different folder and/or run chkdsk and/or remove the file that causes the script to hang.

    If it is on a different system then there is something wrong on the original PC. You should test the code using a "clean boot".

    Either way this is not a scripting question because there is nothing wrong with the script itself.

    • Proposed as answer by Frederik Long Saturday, October 25, 2014 5:45 AM
    • Marked as answer by SpankyTravis Sunday, October 26, 2014 11:36 PM
    Thursday, October 23, 2014 6:18 AM
  • I ran the script on the same PC.  I agree with you, there could be a problem with my file system.  I will pursue that avenue.  thanks for you time.
    Sunday, October 26, 2014 11:39 PM