iNNOKENTIY21
Silver Member | Редактировать | Профиль | Сообщение | Цитировать | Сообщить модератору Sub FileExists(file) If (NOT fso.FileExists(file)) Then WScript.Echo file, " - не найден." Call EndScript() End If End Sub Function AddQuotes(str) AddQuotes = """" & str & """" End Function Sub EndScript If (NOT IsNull(fso)) Then Set fso = Nothing End If If (NOT IsNull(objShell)) Then Set objShell = Nothing End If WScript.Quit End Sub Dim fso Set fso = CreateObject("Scripting.FileSystemObject") Dim program program = "C:\Program Files\MKVToolNix\mkvpropedit.exe" Call FileExists(program) Dim file file = Wscript.Arguments(0) Call FileExists(file) Dim title title = InputBox("Введите название: ", "Задать название в mkv") If IsEmpty(title) Then Call EndScript() End If title = "--edit info --set title=""" & title & """" file = AddQuotes(file) program = AddQuotes(program) Dim objShell Set objShell = WScript.CreateObject ("WScript.shell") objShell.run program & " " & file & " " & title, 0, false |