Results 1 to 5 of 5

Thread: [Resolved] VBScript to bring back length of sound files.

Threaded View

  1. #1

    Thread Starter
    New Member
    Join Date
    Jul 2012
    Posts
    6

    Resolved [Resolved] VBScript to bring back length of sound files.

    Hi All,

    I have created a small script to bring back the length of a sound file; currently it brings back the name and length of the sound file in the specified directory. Is it possible to make this look under that particular directory for all sound files irrespective of how many folders there are? I know I should be using a recursive approach but am not really getting it to work. Could anyone advise on how best to create this?

    Code:
    Dim list(35)
    Set objShell = CreateObject("Shell.Application")
    Set objFolder = objShell.Namespace("C:\test\")
    For i = 27 to 27
     list(i) = objFolder.GetDetailsOf(objFolder.Items, i)
    Next
    For Each strFileName in objFolder.Items
     For i = 27 to 27
     Wscript.Echo strFileName & vbtab & list(i) _
     & ": " & objFolder.GetDetailsOf(strFileName, i)
     Next
    Next
    Thanks in advance.
    Last edited by jimmysheedah; Jul 24th, 2012 at 05:15 AM. Reason: Resolved

Posting Permissions

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



Click Here to Expand Forum to Full Width