RetroShare/build_scripts/Windows/tools/find-in-path.bat
thunder2 a35985e3fc Windows build environment:
- Added build script
- Added build-installer script
- Added pack script
- Added gitlog script
- Use shadow build
2016-10-04 09:24:48 +02:00

27 lines
355 B
Batchfile

:: Usage:
:: call find-in-path.bat variable file
setlocal
set Var=%~1
set File=%~2
if "%File%"=="" (
echo.
echo Parameter error.
exit /B 1
)
set FoundPath=
SET PathTemp="%Path:;=";"%"
FOR %%P IN (%PathTemp%) DO (
IF EXIST "%%~P.\%File%" (
set FoundPath=%%~P
goto :found
)
)
:found
endlocal & set %Var%=%FoundPath%