Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hi I Created Multi File Comparer Without Command :) #32

Open
DarkFrost1989 opened this issue Feb 9, 2023 · 0 comments
Open

Hi I Created Multi File Comparer Without Command :) #32

DarkFrost1989 opened this issue Feb 9, 2023 · 0 comments
Labels
contribution Useful contributions from others os: windows Windows

Comments

@DarkFrost1989
Copy link

DarkFrost1989 commented Feb 9, 2023

Hi Firstly Thank You For Created Awsome Comparer, I Also Wanted To Contribute This Good Project,And I Created Multi File Comparer Without Any Command Just Create video-compare.exe Folder, Folder Named "Input" And Put 2 Video Files Here
Like This
HEIZ4Qn.md.png
After Paste This Command For Batch File And Start Batch This Command Automatically Get File And Compare 2 Video
This Code Tested Win 11 22H2 22621.819
Code İs Here And Share For Free :

@echo off
setlocal EnableDelayedExpansion
echo --------------------------------------------------------------
echo               �[1m�[5m�[32mDark Frost \ Dark Blade�[0m
echo --------------------------------------------------------------
set CompareOptions=-m split
set CompareWindowsize=-w 1920x1080
set Supportedformat="*.*"
set InputFolder="Input\"
set InputFolderCD=%cd%\Input\
echo --------------------------------------------------------------
echo            �[1m�[5m�[34mStart File Checking Please Wait�[0m
echo --------------------------------------------------------------
:: commandA && commandB Run commandA, if it succeeds then run commandB
:: commandA || commandB Run commandA, if it fails then run commandB
dir /b /s "Input\" | findstr .>nul && (goto :Compare)
dir /b /s "Input\" | findstr .>nul || (goto :Error)
::::: -------------------------------------------------------------
:Compare
echo --------------------------------------------------------------
echo            �[1m�[5m�[31mStart Video Compare Please Wait�[0m
echo --------------------------------------------------------------
:: Thanks "jeb" For Folder Line Reader "https://stackoverflow.com/questions/31035636/batch-store-command-output-to-a-variable-multiple-lines"
@echo on 
set "output_cnt=0"
for /F "delims=" %%f in ('dir /b "%InputFolder%\%Supportedformat%"') do (
    set /a output_cnt+=1
    set "output[!output_cnt!]=%%f"
)
for /L %%n in (1 1 !output_cnt!) DO echo !output[%%n]!
set Out1=!output[1]!
set Out2=!output[2]!
video-compare %CompareWindowsize% %CompareOptions% "%InputFolderCD%%Out1%" "%InputFolderCD%%Out2%"
@echo off
echo --------------------------------------------------------------
echo            �[1m�[5m�[32mVideo Compare Complete�[0m
echo --------------------------------------------------------------
Goto :Finish
:Error
echo --------------------------------------------------------------
echo      �[1m�[5m�[31mFile Not Found Please Put File "Input" Folder�[0m
echo --------------------------------------------------------------
Goto :Finish
:Finish
Pause

Best Regards
Fatih Çakır

@jonfryd jonfryd added the contribution Useful contributions from others label Feb 10, 2023
@jonfryd jonfryd added the os: windows Windows label Jul 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contribution Useful contributions from others os: windows Windows
Projects
None yet
Development

No branches or pull requests

2 participants