Имя пользователя:
Пароль:  
Помощь | Регистрация | Забыли пароль?  

Показать сообщение отдельно

Ветеран


Сообщения: 27449
Благодарности: 8087

Профиль | Отправить PM | Цитировать


91892823, попробуйте скрипт vbscript:
читать дальше »
Код: Выделить весь код
Option Explicit

Const READYSTATE_COMPLETE = 4


Dim strSourceFolder

Dim objShell
Dim objFolder
Dim objFolderItem

Dim intDuration
Dim dtTotalDuration


If WScript.Arguments.Count = 1 Then
	strSourceFolder = WScript.Arguments.Item(0)
	
	Set objShell  = WScript.CreateObject("Shell.Application")
	Set objFolder = objShell.NameSpace(strSourceFolder)
	
	If Not objFolder Is Nothing Then
		For intDuration = 0 To 86
			If UCase(objFolder.GetDetailsOf(, intDuration)) = UCase("Длительность") Or _
				UCase(objFolder.GetDetailsOf(, intDuration)) = UCase("Duration") Then
				
				Exit For
			End If
		Next
		
		dtTotalDuration = CDate("00:00:00")
		
		For Each objFolderItem In objFolder.Items
			If UCase(Right(objFolderItem.Name, 4)) = UCase(".mp3") Then
				dtTotalDuration = dtTotalDuration + CDate(objFolder.GetDetailsOf(objFolderItem, intDuration))
			End If
		Next
		
		With WScript.CreateObject("InternetExplorer.Application")
			.Navigate("about:blank")
			
			Do
				WScript.Sleep 100
			Loop Until Not .Busy And .ReadyState = READYSTATE_COMPLETE
			
			.document.parentWindow.clipboardData.setData "text", CStr(dtTotalDuration)
			
			.Quit
		End With
	Else
		WScript.Echo "Can't find source folder [" & strSourceFolder & "]"
	End If
	
	Set objFolder = Nothing
	Set objShell  = Nothing
Else
	WScript.Echo "Usage: " & WScript.ScriptName & " <Source folder>" & vbCrLf & _
		"" & vbCrLf & _
		"Or drag one folder into this script"
End If

WScript.Quit 0

Цитата 91892823:
папку в которой он находится »
Это в корне неправильный подход.
Это сообщение посчитали полезным следующие участники:

Отправлено: 22:01, 27-06-2012 | #2