31 lines
631 B
Batchfile
31 lines
631 B
Batchfile
@echo off
|
|
REM Run script - launches GUI or CLI based on args
|
|
REM Usage: run.bat -> GUI
|
|
REM run.bat C:\path -> CLI scan of path
|
|
REM run.bat --gui -> GUI
|
|
|
|
setlocal
|
|
|
|
where java >nul 2>&1
|
|
if %errorlevel% neq 0 (
|
|
if exist "C:\Program Files\Eclipse Adoptium\jdk-8.0.504.1-hotspot\bin\java.exe" (
|
|
set "PATH=C:\Program Files\Eclipse Adoptium\jdk-8.0.504.1-hotspot\bin;%PATH%"
|
|
)
|
|
)
|
|
|
|
if "%~1"=="" (
|
|
echo Launching GUI...
|
|
java DuplicateFinderGUI
|
|
goto :eof
|
|
)
|
|
|
|
if "%~1"=="--gui" (
|
|
java DuplicateFinder --gui
|
|
goto :eof
|
|
)
|
|
|
|
REM Otherwise treat as CLI
|
|
java DuplicateFinder %*
|
|
|
|
endlocal
|