Sunday, September 26, 2010

vbs - enum_folder_mencoder_join

Sub enum_folder_mencoder_join()
    Dim fso As New FileSystemObject, fo As Folder, fi As File, s, i
    Dim pn
    pn = "F:\Movies\new!"
    pn = "F:\Neuer Ordner\Neuer Ordner (3)"
    pn = "F:\Movies\AVI"
    pn = "F:\Movies\new2"
    'pn = "F:\Movies\new!"
    pn = "D:\JD\_DONE_"
    'pn = "D:\Filme\new"
    
    
    For Each fo In fso.GetFolder(pn).SubFolders
        i = 0: s = ""
        For Each fi In fo.Files
            If Right(fi.Name, 4) = ".avi" Then
                If InStr(1, fo.Name, fi.Name) > 0 Then Exit For
                i = i + 1
                s = s & "|" & fi.Name
            End If
        Next
        If i > 1 Then
            Debug.Print "d:\mencoder -noodml -ovc copy -oac copy -o """ & fo.Name & "\" & fo.Name & "-XviD.avi"" " & Mid(Replace(s, "|", """ """ & fo.Name & "\") & """", 3)
            
        End If
    Next
    
    
End Sub


No comments: