-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCheckMate.bat
More file actions
70 lines (61 loc) · 1.66 KB
/
CheckMate.bat
File metadata and controls
70 lines (61 loc) · 1.66 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
@echo off
color a
title CheckMate v1.0
echo ______ __ __ __ ___ __
echo ^/ ____^/^/ ^/_ ___ _____ ^/ ^/__ ^/ ^|^/ ^/____ _ ^/ ^/_ ___
echo ^/ ^/ ^/ __ \ ^/ _ \ ^/ ___^/^/ ^/^/_^/ ^/ ^/^|_^/ ^/^/ __ `^/^/ __^/^/ _ \
echo / ^/___ ^/ ^/ ^/ ^/^/ __^/^/ ^/__ ^/ ,^< ^/ ^/ ^/ ^/^/ ^/_^/ ^/^/ ^/_ ^/ __^/
echo \____^/^/_^/ ^/_^/ \___^/ \___^/^/_^/^|_^| ^/_^/ ^/_^/ \__,_^/ \__^/ \___^/ v1.0
echo.
echo GitHub: https://github.com/ShahriarShanto/CheckMate
echo.
set dtime=%DATE% %TIME%
echo Started on %dtime%
echo.
set banner=0
set corrfound=0
set "filtro=%1"
if [%filtro%]==[] (
set "filtro=*.mp4"
echo I will check all MP4 files in current folder
echo.
)
for /R %%a in (%filtro%) do call :runTest "%%a"
del "CheckMate Log.txt"
IF %corrfound%==1 (
echo Corrupted Files are listed in "Corrupted Files.txt"
) ELSE (
echo All tested files are OK!
)
echo.
PAUSE
exit /B
:runTest
echo Checking "%~nx1%"
C:\CheckMate\ffmpeg.exe -v error -i "%~1" -f null - > "CheckMate Log.txt" 2>&1
call :checklog "CheckMate Log.txt" "%~1"
echo.
goto END
:checklog
IF %~z1==0 (
echo File is OK!
) ELSE (
color c
echo File is corrupted!
set corrfound=1
IF %banner%==0 (
IF exist "Corrupted Files.txt" (
echo.>>"Corrupted Files.txt"
)
echo ======== CheckMate ========>>"Corrupted Files.txt"
echo.>>"Corrupted Files.txt"
echo Started on %dtime%>>"Corrupted Files.txt"
echo.>>"Corrupted Files.txt"
echo Corrupted Files:>>"Corrupted Files.txt"
set banner=1
)
echo.>>"Corrupted Files.txt"
echo "%~nx2%">>"Corrupted Files.txt"
)
goto END
:END