Appending to User Environment Variable PATH without duplicating is not working for the last path – Windows 11 CMD

I looked through a few solutions here and found an almost working script to append to the user Environment Variable PATH without overwriting the existing path and not clutter it with system’s EV’s PATH. I wanted to add 4 paths, 2 from Python and 2 from Anaconda. The first 3 locations work perfectly (Python311, Python312, conda.exe), but it keeps duplicating the 4th path (_conda.exe) even though the script sequence is the same. Thoughts?

@echo off
REM usage: append_user_path "path"
SET Key="HKCUEnvironment"
FOR /F "usebackq tokens=2*" %%A IN (`REG QUERY %Key% /v PATH`) DO Set CurrPath=%%B
echo Add %appdata%PythonPython311Scripts to PATH
@echo off
set "newPath=%appdata%PythonPython311Scripts"
echo %CurrPath% | findstr /i /c:"%newPath%" >nul
if errorlevel 1 (
    setx PATH "%CurrPath%;%newPath%"
    echo Path updated successfully.
) else (
    echo Path already contains the directory.
)

REM usage: append_user_path "path"
SET Key="HKCUEnvironment"
FOR /F "usebackq tokens=2*" %%A IN (`REG QUERY %Key% /v PATH`) DO Set CurrPath=%%B
echo Add %appdata%PythonPython312Scripts to PATH
@echo off
set "newPath=%appdata%PythonPython312Scripts"
echo %CurrPath% | findstr /i /c:"%newPath%" >nul
if errorlevel 1 (
    setx PATH "%CurrPath%;%newPath%"
    echo Path updated successfully.
) else (
    echo Path already contains the directory.
)

REM usage: append_user_path "path"
SET Key="HKCUEnvironment"
FOR /F "usebackq tokens=2*" %%A IN (`REG QUERY %Key% /v PATH`) DO Set CurrPath=%%B
echo Add %ProgramFiles%ContinuumAnaconda3conda.exe to PATH
@echo off
set "newPath=%ProgramFiles%ContinuumAnaconda3conda.exe"
echo %CurrPath% | findstr /i /c:"%newPath%" >nul
if errorlevel 1 (
    setx PATH "%CurrPath%;%newPath%"
    echo Path updated successfully.
) else (
    echo Path already contains the directory.
)

REM usage: append_user_path "path"
SET Key="HKCUEnvironment"
FOR /F "usebackq tokens=2*" %%A IN (`REG QUERY %Key% /v PATH`) DO Set CurrPath=%%B
echo Add %ProgramFiles%ContinuumAnaconda3_conda.exe to PATH
@echo off
set "newPath=%ProgramFiles%ContinuumAnaconda3_conda.exe"
echo %CurrPath% | findstr /i /c:"%newPath%" >nul
if errorlevel 1 (
    setx PATH "%CurrPath%;%newPath%"
    echo Path updated successfully.
) else (
    echo Path already contains the directory.
)
Pause

Append path works as intended for the first 3 paths if they already exist. But even if the 4th path exists, it appends/adds/duplicates it anyway

Screenshot of above’s explanation