max5moritz
Goto Top

MediaDat - Infos einholen für Film-Montage oder auch eigenständig zu nutzen

Ich habe disen Skript entwickelt, um mal schnell einen Blick unter die Haube einer Medien-Datei werfen zu können.
Die Infos sind ausdruckbar. Ansonsten liefert "MediaDat" die Infos als Variable zur Weiternutzung, bei z.B. in der "Film-Montage".

back-to-topWozu MediaDat?

Der Grund ist bereits erklärt, wer mehr wissen will - ausprobieren.

Es werden bis 100 Streams ausgewertet und der Reihe aufgelistet. Mit Hilfe von z.B. "Film-Montage" können diese dann umgrupppiert werden.
So startet dann der Film immer mit der Wunschsprache, was in der Regel der erste Audio-Stream ist.


back-to-topUpdate

Ja, es gibt bereits ein Update. Eine Kleinigkeit - Ich habe einen Zeitstempel eingefügt. Dieser ist Teil der start-set.bat.
Version-Stand: 1.3 - Der Zeitstempel hatte fehlende "AnführungsZeichen" aufgezeigt. Das ist nun behoben.
Er soll verhindern, dass sich die Skripte - auf Mehrkern-Rechnern kann ffmpeg auch mehrfach laufen - sich gegenseitig die Infos überschreiben. face-devilish
Die Version-Nr. erscheint kurz nach dem Start als Fenster-Titel. Den Zeit-Stempel findet Ihr unten.
Fehlt die start-set wird sie jetzt mit erstellt. Allein das Anpassen müßt Ihr schon noch selbst. 0face-smile


back-to-topDer Skript

@echo off&mode con cols=91 lines=9& color 3F&title %~n0 - Vers. 1.3
REM Die Variable %ffmpeg% = Pfad+Prog-Name ist in einer eigenen start-set.bat festzulegen.
set "info=echo   Process-Parameter aus einer Medien-Datei mittels "ffmpeg" ermitteln. Dazu entweder"  
set "info=%info%&echo   eine Datei auf diesen Skript ziehen oder einen Skript-Link im sendTo-Ordner anlegen."  
if %1n==n (echo.&%info%&echo.&ping -n 8 localhost 1>nul 2>nul) ELSE echo.&echo.&echo.
set "info=echo     Erst noch den Start-set-Skript ^(*.bat oder *.cmd^) anpassen."  
echo               Entwurf und Layout by max5moritz & set "prgs=ffmpeg,mp4box"  
:reStart
if %2n==n call start-set "progs" "stamp"&ping -n 2 localhost 1>nul 2>nul & call :pprob  
if not exist "%~dp0start-set.*" (cls&echo.&echo.&echo.&%info%&ping -n 4 localhost 1>nul 2>nul & call :startSet  
	) ELSE cls & set "info=Suche nach Infos von "%~n1""  
if not %1n==n (cls & echo.&echo.&echo.&echo  %info%&title %~n0 - %info%&ping -n 4 localhost 1>nul 2>nul) ELSE goto: eof
set "lin2=echo _________________________________________________________________________________________________________________________________"  
set "lin5=echo ---------------------------------------------------------------------------------------------------------------------"  
set "lin6=~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"  
set "sv=%~1"&set outex=&set StreamExt=&set newName=&set Process=&set "error=none"  
set StNr=0&set vidNr=0&set audNr=0&set subNr=0&set Len=0&set "ac3=none"  
if %1n==n (goto ende) ELSE set "sv=%sv:~-3,3%"  
if "%sv:~0,1%"=="." set "sv=%sv:~1,2%"  
if not %2n==TSDn if not %2n==n (set "Zeit=%~2") ELSE setlocal enabledelayedexpansion  
if "%lin3%"=="" (set "lin3=echo %lin6%"&pushd %~dp0) ELSE set "Info=%~3."  
if  "%inex%"=="" (set "AnzDat=%tmp%\%stamp%MiD-1.txt") ELSE set "AnzDat=%InPar%"  
if  "%inex%"=="" (set "LogDat=%tmp%\%stamp%MiD-2.txt") ELSE set "LogDat=%InDat%"  
if exist %MiD-Info% set "AnzDat=%MiD-Info:~0,-4%_1.txt"& set "LogDat=%MiD-Info:~0,-4%_2.txt"  
goto :Main

:Analyse
if exist "%tmp%\%stamp%MiD-Anzg.tmp" del "%tmp%\%stamp%MiD-Anzg.tmp"  
if "%vidNr%" equ "0" (set "Media=keinVideo") ELSE set "Media=Video mit %sv%"  
if "%audNr%" equ "0" (set "Media=%media%, ohne Audio" &	set "zw=^,aber") ELSE set "Media=%media%, Audio"&set "zw= und"  
if "%subNr%" equ "0" (set "Media=%media%, ohne Untertitel") ELSE set "Media=%media%%zw% und Untertitel"  
title %~n0 - %info%&cls&set "info=echo  MediaDaten: %Media%"&set /A Lines=15+%StNr%  
mode con cols=95 lines=%Lines%&color 1F
set aud=%aud%&@%info%>"%AnzDat%"&echo.&%info%&%lin3%~~~~~~~~~~~~~~&echo.  
echo  Stream     Nr     Pid      Typ      Art       Qualit„t&%lin3%~~~~~~~~~~~~~~
@echo.>>"%AnzDat%"&%lin3%%lin3:~5,25%>>"%AnzDat%"&if not "%Len%" equ "0" goto :Zahl  

:Anzeige
if "%Len%" equ "0" (echo  Stream-0: %Stream-0:~0,-9%&echo  Stream-0: %Stream-0:~0,-9%>>"%AnzDat%" &(  
	echo  Stream-0: %Stream-0:~0,-9%>>"%tmp%\%stamp%MiD-Anzg.tmp"  
	)) ELSE echo  Stream-%Len%: %Stream:~0,-9%&echo  Stream-%Len%: %Stream%>>"%AnzDat%" &(  
	echo  Stream-%Len%: %Stream:~0,-9%>>"%tmp%\%stamp%MiD-Anzg.tmp"  
	)
set /A Len=%Len%+1
if %Len% lss %StNr% (goto :Zahl) ELSE echo.&echo.&%lin3%~~~~~~~~~~~~~~&echo.
echo  error=!error!, vid=%vidNr%, aud=%audNr%, sub=%subNr%, Bild=%vi5%
echo  proid=%proid%, videx=%vi9%, audex=%au9%
echo  outex=%outex%, ac3=%ac3%, Transcode=%vi7:~7,6%, Dauer=%length%&echo.
if %2n==TSDn goto ende
if not %2n==n (ping -n 3 localhost 1>NUL 2>NUL
) ELSE start notepad "%LogDat%"&ping -n 4 localhost 1>NUL 2>NUL&del /q "%tmp%\%stamp%MiD*.*" & exit  
goto :ende

:Main
%ffmpeg% -i "%~1" 2>"%AnzDat%"  
if %2n==n ping -n 2 localhost 1>NUL 2>NUL
:noneVideo
find /n /i "Video:" "%AnzDat%"  
if errorlevel 1 set "Media=noneVideo"  
findstr /c:"Video: none" "%AnzDat%"  
if not errorlevel 1 set "Media=noneVideo"  
if %2n==n color 1F&mode con cols=125 lines=15&echo  Medien-Info von:>"%LogDat%"&echo "%~1">>"%LogDat%"&%lin2% >>"%LogDat%"  
echo =================================== Parameter ===========================================>> "%LogDat%"  
FOR /f "delims=, tokens=1-3" %%i IN ('findstr /n "Duration" "%AnzDat%"') DO @(  
	set "tc-1=%%i" & if /I "!tc-1:~5,8!"=="Duration" (  
		set "tc-1=!tc-1:~4,25!" &@echo tc1=!tc-1! >> "%LogDat%"  
		) ELSE set "tc-1=!tc-1:~5,25!" &@echo tc1=!tc-1! >> "%LogDat%"  
	set "tc-2=%%j" & echo tc2=!tc-2! >> "%LogDat%"  
	set "tc-3=%%k" & echo tc3=!tc-3! >> "%LogDat%"  
	set "length=h !tc-1:~11,8!"&@%lin5%>> "%LogDat%"  
	if "!length:~2,2!"=="00" set "length=!length:~5,5! min"  
	if "!length:~2,4!"=="00:0" set "length=!length:~6,4! min"  
	if "!length:~2,1!"=="0" if not "!length:~3,1!"=="0" set "length=h !length:~3,7!"  
	)
FOR /f "delims=, tokens=1-10" %%a IN ('findstr /n "Stream" "%AnzDat%"') DO @(  
	set out=0&set audio1=0&set audio2=&set ffNr=&set parm=&set auparm=
	echo ~~~ Stream-!StNr! %lin6%>> "%LogDat%"  
	set "cc-1=%%a" & if /I "!cc-1:~7,6!"=="Stream" (  
		set "cc-1=!cc-1:~6,75!"&@echo cc1=!cc-1! >> "%LogDat%"  
		) ELSE set "cc-1=!cc-1:~7,75!"&@echo cc1=!cc-1! >> "%LogDat%"  
	set "cc-2=%%b"&if not !cc-2!n==n echo cc2=!cc-2! >> "%LogDat%"  
	set "cc-3=%%c"&if not !cc-3!n==n echo cc3=!cc-3! >> "%LogDat%"  
	set "cc-4=%%d"&if not !cc-4!n==n echo cc4=!cc-4! >> "%LogDat%"  
	set "cc-5=%%e"&if not !cc-5!n==n echo cc5=!cc-5! >> "%LogDat%"  
	set "cc-6=%%f"&if not !cc-6!n==n echo cc6=!cc-6! >> "%LogDat%"  
	set "cc-7=%%g"&if not !cc-7!n==n echo cc7=!cc-7! >> "%LogDat%"  
	set "cc-8=%%h"&if not !cc-8!n==n echo cc8=!cc-8! >> "%LogDat%"  
	set "cc-9=%%i"&if not !cc-9!n==n echo cc9=!cc-9! >> "%LogDat%"  
	@echo ----------------------->> "%LogDat%"  
	cls&echo.&echo.&if !StNr! gtr 9 (Echo  Stream    =!cc-1:~7,93!) ELSE Echo  Stream   =!cc-1:~7,93!
	For /f "delims=: tokens=1-6" %%i IN ("!cc-1!") DO @(  
		set "sc-1=%%i"&if not !sc-1!n==n echo sc1=!sc-1! >> "%LogDat%"  
		set "sc-2=%%j"&if not !sc-2!n==n echo sc2=!sc-2! >> "%LogDat%"  
		set "sc-3=%%k"&if not !sc-3!n==n echo sc3=!sc-3! >> "%LogDat%"  
		set "sc-4=%%l"&if not !sc-4!n==n echo sc4=!sc-4! >> "%LogDat%"  
		set "sc-5=%%m"&if not !sc-5!n==n echo sc5=!sc-5! >> "%LogDat%"  
		set "sc-6=%%n"&if not !sc-6!n==n echo sc6=!sc-6! >> "%LogDat%"  
		:Video
		if "!sc-3:~1,5!"=="Video" (  
			if "!sc-2:~0,1!" equ "!StNr!" set "vi1=!sc-2:~0,1!:0"  
			if "!sc-2:~0,2!" equ "!StNr!" set "vi1=!sc-2:~0,2!:0"  
				set "vi2=!cc-1:~12,6!"&(  
				if "!cc-1:~18,1!"=="]" set "vi2=!cc-1:~12,7!"  
				if "!cc-1:~19,1!"=="]" set "vi2=!cc-1:~12,8!"  
				if "!vi2:~-1,1!"==":" set "vi2=[!vi2:~1,-2!]"  
			)
			set "vi3=!sc-3:~1,5!"   
			set "vi4=!sc-4:~1,5!" &if /I "!sc-4:~1,4!"=="h264" set "vi4=!sc-4:~1,4!"  
			For /f "delims= tokens=1,2" %%a IN ("!cc-3!") DO @set "cc-3A=%%a"& set "vi10=%%b"  
			set "vi5=!cc-3A:~1,-1!"  
		)
		:Audio
		if "!sc-3:~1,5!"=="Audio" (  
		if "!sc-2:~0,1!" equ "!StNr!" set "au1=!sc-2:~0,1!:0"  
		if "!sc-2:~0,2!" equ "!StNr!" set "au1=!sc-2:~0,2!:0"  
			set "au2=!cc-1:~12,6!"&(  
				if "!cc-1:~18,1!"=="]" set "au2=!cc-1:~12,7!"  
				if "!cc-1:~19,1!"=="]" set "au2=!cc-1:~12,8!"  
				if "!au2:~-1,1!"==":" set "au2=[!au2:~1,-2!]"  
			)
			set "au3=!sc-3:~1,5!"  
			set "au4=!sc-4:~1,3!"  
			set "au5=!cc-3:~1,6!"  
			set "au6=!cc-5:~1,8!"  
		)
		:Subtitle
		if "!sc-3:~1,5!"=="Subti" (  
		if "!sc-2:~0,1!" equ "!StNr!" set "su1=!sc-2:~0,1!:0"  
		if "!sc-2:~0,2!" equ "!StNr!" set "su1=!sc-2:~0,2!:0"  
			set "su2=!cc-1:~12,6!"&(  
				if "!cc-1:~18,1!"=="]" set "su2=!cc-1:~12,7!"  
				if "!cc-1:~19,1!"=="]" set "su2=!cc-1:~12,8!"  
				if "!su2:~-1,1!"==":" set "su2=[!su2:~1,-2!]"  
			)
			set "su3=!sc-3:~1,8!"			  
			set "su4=!sc-4:~1,3!"  
		)
		:Unknown
		if "!sc-3:~1,5!"=="Unkno" (  
		if "!sc-2:~0,1!" equ "!StNr!" set "ub1=!sc-2:~0,1!:0"  
		if "!sc-2:~0,2!" equ "!StNr!" set "ub1=!sc-2:~0,2!:0"  
			set "ub2=!sc-2:~1,6!"&(  
				if "!sc-2:~8,1!"=="]" set "ub2=!sc-2:~1,7!"  
				if "!sc-2:~9,1!"=="]" set "ub2=!sc-2:~1,8!"  
				if "!ub2:~-1,1!"==":" set "ub2=[!ub2:~1,-2!]"  
			)
			set "ub3=!sc-3:~1,8!"			  
			set "ub4=!sc-4:~1,30!"  
		)
		if "Stream0"=="Stream!sc-2:~0,1!" set Stream0=!sc-3:~1,5!  
		if "Stream0"=="Stream!sc-2:~0,2!" set Stream0=!sc-3:~1,5!  
		if "!sc-3:~1,5!"=="Video"	call :videoset  
		if "!sc-3:~1,5!"=="Audio"	call :audioset  
		if "!sc-3:~1,5!"=="Subti"	call :subtitleset  
		if "!sc-3:~1,5!"=="Unkno"	call :unknownset  
		@%lin5%>> "%LogDat%"  
		if "!sc-2:~1,17!"=="not enough frames" (  
			set "error=not enough frames"  
			set /A StNr-=1 & set Len=0
		))
	echo  Stream-!Ziffer! = !sc-3:~1,10!
	set /A StNr+=1
	if %2n==n ping -n 3 localhost 1>NUL 2>NUL
)
:info
if "!vidNr!" equ "0" if "!audNr!" equ "0" (  
	if /I not "!sc-3:~1,7!"=="Unknown" goto :Fehler  
	if "!error!"=="not enough frames" goto :Fehler  
	)
if %2n==TSDn goto :info-ende
mode con cols=101 lines=24
cls&echo.&set "info= Parameter gefunden:"  
title %~n0 - %info%&echo %Info%&echo %lin6%%lin6:~0,30%
echo (Stream)  : !vi1!			!au1!		!su1!		!ub1!
echo (PID)     : !vi2!		!au2!		!su2!		!ub2!
echo (Art)     : !vi3!		!au3!		!su3!		!ub3!
echo (Inhalt)  : !vi4!		!au4!		!su4!		!ub4!
echo (Format)  : !vi5!		!au5!			---		---
echo (Qualit„t): !vi6!		!au6!			---		---
echo (Process) : !vi7!		!au7!	!su7!
echo (Parm)    : !vi8!	!au8!
echo (Outex)   : !vi9!			!au9!
echo (SAR-DAR) : !vi10!		---		---		---	
if %2n==n ping -n 6 localhost 1>NUL 2>NUL

:info-ende
type "%tmp%\%stamp%MiDnewSET.tmp">> "%LogDat%"  
del "%tmp%\%stamp%MiDnewSET.tmp"&@!lin2!>> "%LogDat%"  
goto :Analyse

:Parm-Test
echo vi5=!vi5!
echo vi10=!vi10!
pause
For /f "delims=x tokens=1,2" %%a IN ("!cc-3!") DO @echo A=%%a, B=%%b  
For /f "delims= tokens=1,2" %%a IN ("!cc-3!") DO @echo A=%%a, B=%%b  
pause
goto :eof

:videoSet
set /A vidNr+=1
findstr /n /i "wmv1" "%AnzDat%"  
if not errorlevel 1 goto :video-mpeg2
FOR %%i IN (mpeg1 mpeg2 mpeg4 h264) DO if "!vi4!"=="%%i"  goto :video-%%i  
goto :eof
:video-mpeg1
set /A vid+=1
set vi7=vid1%vidNr%%vid%;demux
set vi8=-vcodec copy
set vi9=mpeg
goto :videoEcho
:video-mpeg2
set /A vid+=1
set vi7=vid2%vidNr%%vid%;normal
set vi8=-vcodec copy
set vi9=mp4
goto :videoEcho
:video-mpeg4
set /A vid+=1
set vi7=vid4%vidNr%%vid%;normal
set vi8=-vcodec copy
set vi9=mp4
goto :videoEcho
:video-h264
set /A vid+=1
if /I "%inex%"==".ts" (set "vi7=demux") ELSE set "vi7=none"  
set vi7=vid5%vidNr%%vid%;%vi7%
set vi8=-vcodec copy
set vi9=mp4
:videoEcho
set /a ziffer=!cc-1:~11,2!+0  2>nul
if "!cc-1:~11,2!" NEQ "!ziffer!" set "ziffer=!cc-1:~11,1!"  
echo Stream-!ziffer!: "!vi1!", "!vi2!", "!vi3!", "!vi4!", "!vi5!", "!vi6!", "!vi7!", "!vi8!", "!vi9!", "!vi10!">>"%tmp%\%stamp%MiDnewSET.tmp"  
echo !vi1!;!vi2!;!vi3!;!vi4!;!vi5!;!vi6!;!vi7!;!vi8!;!vi9!;!vi10!,Stream-!ziffer!  >"%tmp%\%stamp%MiD-Strm.tmp"  
set "Stream-!ziffer!=!vi1!;!vi2!;!vi3!;!vi4!;!vi5!;!vi6!;!vi7!;!vi8!;!vi9!;!vi10!,Stream-!ziffer!"  
goto :eof

:audioSet
set /A audNr+=1&set /A ffNr+=1
:audio-suche
findstr /n /i "wma pcm" "%AnzDat%"  
if not errorlevel 1 goto :audio-mp2
FOR %%i IN (mp2 mp3 aac ac3 dts) DO if "!au4!"=="%%i" goto :audio-%%i  
goto :eof
:audio-mp2
set /A aud+=1
set "au7=aud2%audNr%%aud%;normal"  
set "au8=-acodec libmp3lame -sameq"  
set "au9=mp3"  
goto :audioEcho
:audio-mp3
set /A aud+=1
set au7=aud3%audNr%%aud%;normal
set au8=-acodec copy
set au9=mp3
goto :audioEcho
:audio-aac
set /A aud+=1
set "au7=aud4%audNr%%aud%;demux"  
set "au8=-acodec ac3 -sameq"  
set "au9=ac3"  
goto :audioEcho
:audio-ac3
set /A aud+=1
if /I "!au5!"=="Stereo" (  
	set au7=aud5%audNr%%aud%;demux
	set au8=-acodec copy
	set au9=ac3
	)
if /I not "!au5!"=="Stereo"	(  
	set au7=aud6%audNr%%aud%;demux
	set au8=-acodec copy
	set au9=ac3
	)
goto :audioEcho
:audio-dts
set /A aud+=1
if /I "!au5!"=="Stereo" (  
	set au7=aud5%audNr%%aud%;demux
	set au8=-acodec copy
	set au9=dts
	)
if /I not "!au5!"=="Stereo"	(  
	set au7=aud6%audNr%%aud%;demux
	set au8=-acodec copy
	set au9=dts
	)
goto :audioEcho
:audioEcho
set /a ziffer=!cc-1:~11,2!+0  2>nul
if "!cc-1:~11,2!" NEQ "!ziffer!" set "ziffer=!cc-1:~11,1!"  
echo Stream-!ziffer!: "!au1!", "!au2!", "!au3!", "!au4!", "!au5!", "!au6! kB/s", "!au7!", "!au8!", "!au9!">>"%tmp%\%stamp%MiDnewSET.tmp"  
echo !au1!;!au2!;!au3!;!au4!;!au5!;!au6!;!au7!;!au8!;!au9!,Stream-!ziffer! >>"%tmp%\%stamp%MiD-Strm.tmp"  
set "Stream-!ziffer!=!au1!;!au2!;!au3!;!au4!;!au5!;!au6!;!au7!;!au8!;!au9!,Stream-!ziffer!"  
goto :eof

:subtitleSet
set /A subNr+=1
findstr /c:"Subtitle: text" "%AnzDat%"  
if not errorlevel 1 goto :subti-txt
FOR %%i IN (srt dvb dvd) DO if "!su4!"=="%%i" goto :subti-%%i  
goto :eof
:subti-srt
set /A sub+=1
set su7=sub1%subNr%%sub%;demux
set su8=copy
set su9=srt
goto :subtiEcho
:subti-dvb
set /A sub+=1
set su7=sub2%subNr%%sub%;none
set su8=dvdsub
set su9=sub
goto :subtiEcho
:subti-dvd
set /A sub+=1
set su7=sub2%subNr%%sub%;none
set su8=dvdsub
set su9=sub
goto :subtiEcho
:subti-txt
set /A sub+=1
set su7=sub3%subNr%%sub%;demux
set su8=copy
set su9=txt
goto :subtiEcho
:subtiEcho
set /a ziffer=!cc-1:~11,2!+0  2>nul
if "!cc-1:~11,2!" NEQ "!ziffer!" set "ziffer=!cc-1:~11,1!"  
echo Stream-!ziffer!: "!su1!", "!su2!", "!su3!", "!su4!", "---", "---", "!su7!", "!su8!", "!su9!">>"%tmp%\%stamp%MiDnewSET.tmp"  
echo !su1!;!su2!;!su3!;!su4!;---;---;!su7!;!su8!;!su9!,Stream-!ziffer! >>"%tmp%\%stamp%MiD-Strm.tmp"  
set "Stream-!ziffer!=!su1!;!su2!;!su3!;!su4!;---;---;!su7!;!su8!;!su9!,Stream-!ziffer!"  
goto :eof

:unknownset
set /A ubkNr+=1
if /I not  "!ub4:~0,4!"=="none" goto :eof  
:ubkset
set /A ubk+=1
set "parmV=-vcodec wmv2 -map !ub1!:0"  
set "parmA=-acodec libmp3lame -map 0:!ub1!"  
 set ub7=ub1%ubkNr%%ubk%;demux
set "ub8=%parmV% %parmA%"  
 set ub9=mp4
:unknoEcho
set /a ziffer=!cc-1:~11,2!+0  2>nul
if "!cc-1:~11,2!" NEQ "!ziffer!" set "ziffer=!cc-1:~11,1!"  
echo Stream-!ziffer!: "!ub1!", "!ub2!", "!ub3!", "!ub4!", "---", "---", "!ub7!", "!ub8!", "!ub9!">>"%tmp%\%stamp%MiDnewSET.tmp"  
echo !ub1!;!ub2!;!ub3!;!ub4!;---;---;!ub7!;!ub8!;!ub9!,Stream-!ziffer! >>"%tmp%\%stamp%MiD-Strm.tmp"  
set "Stream-!ziffer!=!ub1!;!ub2!;!ub3!;!ub4!;---;---;!ub7!;!ub8!;!ub9!,Stream-!ziffer!"  
goto :eof

:Zahl
echo "Stream-%Len%">"%tmp%\%stamp%MiDnewSET.tmp"  
set /p Stream=<"%tmp%\%stamp%MiDnewSET.tmp"  
set "Stream=!%Stream:~1,-1%!"&del "%tmp%\%stamp%MiDnewSET.tmp"  
goto :Anzeige

:Fehler
mode con cols=81 lines=9
find /n /i "." "%LogDat%"  
if not errorlevel 1 goto :error
if errorlevel 1 cls&echo.&(
	echo  Anwender-Fehler:&%lin3%&echo.
	echo  Immer nur eine Datei untersuchen lassen.
	ping -n 8 localhost 1>NUL 2>NUL&goto :error-ende
	)
:error
cls&echo.&color 4F
if %2n==TSDn set "error=not enough frames"& goto :eof  
echo  Datei-Fehler:&%lin3%%lin3:~5,25%&echo.&echo  %1&echo.
echo   Bitte im LogBuch nachsehen, Programm wird abgebrochen.
ping -n 5 localhost 1>NUL 2>NUL
notepad "%LogDat%"  
:error-ende
del /q "%tmp%\%stamp%MiD*.*"  
exit

:pprob
setlocal enabledelayedexpansion
FOR %%a IN (%prgs%) DO @(
	call :ppr1 "%%a"  
	if not exist "!pprob!" cls & echo.&(  
	mode con cols=55 lines=8&color FC
	echo  Das Programm "%%a" ist nicht vorhanden,  
	echo  oder der Pfad ist falsch deklariert.&echo.
	echo  Bitte jetzt die start-set.bat korrigieren
	echo  und abspeichern. Der Skript startet dann neu.
	For /F "tokens=1,2 Delims=." %%i in ('dir /b "%~dp0start-set.*"^|Find /i "start-set"') Do @Set "pprst=%%i.%%j"  
	ping -n 5 localhost 1>nul 2>nul
	notepad "%~dp0!pprst!"& cls &echo.& echo  Suche "%%a"  
	ping -n 2 localhost 1>nul 2>nul& goto :reStart
	))
endlocal
goto :eof
:ppr1
set "pprob=!%~1!.exe"  
:ppr2
if  "%pprob:~-4,1%"=="." if  "%pprob:~-4,1%"=="%pprob:~-8,1%" set "pprob=%pprob:~0,-4%" & goto :ppr2  
goto :eof

:startSet
> "%~dp0start-set.bat" echo.if "%%~1"=="progs" goto :%%~1  
>>"%~dp0start-set.bat" echo.:start  
>>"%~dp0start-set.bat" echo.  
>>"%~dp0start-set.bat" echo.:progs  
>>"%~dp0start-set.bat" echo.REM Diesen Bereich anpassen und abspeichern.  
>>"%~dp0start-set.bat" echo.set "ffmpeg=C:\Programme\ffmpeg\bin\ffmpeg"  
>>"%~dp0start-set.bat" echo.  
>>"%~dp0start-set.bat" echo.if "%%~2"=="" (goto :eof) ELSE (goto :%%~2)  
>>"%~dp0start-set.bat" echo.  
>>"%~dp0start-set.bat" echo.:stamp  
>>"%~dp0start-set.bat" echo.set "stamp=%%date:~-4%%%%date:~3,2%%%%date:~0,2%%_%%time::=%%"  
>>"%~dp0start-set.bat" echo.set "stamp=%%stamp:~0,-3%%"  
>>"%~dp0start-set.bat" echo.goto :eof  
>>"%~dp0start-set.bat" echo.  
>>"%~dp0start-set.bat" echo.:ende  
ping -n 2 localhost 1>NUL 2>NUL
notepad "%~dp0start-set.bat"  
goto :eof

:ende

back-to-topStart-set.bat mit Zeitstempel

Ist seit Version 1.1 Bestandteil des Skriptes (Zeilen 377 - 394)


Danke für das Interesse. Anregungen und Kritik sind immer gern gesehen.

max5moritz

Content-ID: 197724

Url: https://administrator.de/contentid/197724

Ausgedruckt am: 21.11.2024 um 12:11 Uhr