Sub TryIt ' Use for converting local .flv files that won't play in VLC ' Requires ffmpeg.exe -- For more information see: ' http://wiki.videolan.org/index.php/Fixing_.flv_to_.avi_with_Ffmpeg ' Copy this VBS file to the folder where ffmpeg.exe can be found ' === Set up input and output file names === Dim args, sFileIn, sFileOut ' Check for/grab input file name parameter Set args = WScript.Arguments If args.Count = 0 then MsgBox "No file name found." & vbCrLf & vbCrLf & "To use:" & vbCrLf & vbCrLf & _ "Create a shortcut to this file;" & vbCrLf & _ "Copy or move the shortcut to your Send To folder;" & vbCrLf & _ "Right-click video file, choose Send To and then your shortcut.", vbInformation Exit Sub End If sFileIn = Trim(args.Item(0)) ' Check for new format parameter (for future applications) and ' create output file name If args.Count >= 2 then sFileOut = """" & Left(sFileIn, InStrRev(sFileIn, ".")) & _ Replace(Trim(args.Item(1)), ".", vbNullString) & """" Else ' MsgBox "No format found, using "".avi"" extension.", vbInformation sFileOut = """" & Left(sFileIn, InStrRev(sFileIn, ".")) & "avi" & """" End If ' === Shell ffmpeg.exe to convert the input file === ' ffmpeg.exe is presumed to be IN THE SAME FOLDER AS THIS SCRIPT !! Dim sPath sPath = Replace(WScript.ScriptFullName, WScript.ScriptName, "ffmpeg.exe") sPath = """" & sPath & """ -i " & """" & sFileIn & """" & " " & sFileOut ' MsgBox sPath ' for debugging path problems Dim oShell, retval Set oShell = WScript.CreateObject("WScript.Shell") retval = oShell.Run(sPath, 1, True) If retval <> 0 Then MsgBox "Failure Code (sorry!): " & retval Exit Sub End If ' === Shell VLC using the default install path (edit if needed) === retval = oShell.Run("""C:\Program Files\VideoLAN\VLC\vlc.exe"" --one-instance-when-started-from-file " & sFileOut, 1, False) End Sub TryIt