Not able to switch to directory using CD command in batch file -
as getting directortry path dynamically, while switching using cd gets default path of script file placed:
@echo off setlocal enabledelayedexpansion %%i in ("%~dp0..\project\abc") set "folder=%%~fi" echo !folder! %%i in ("%~dp0..\dependencies\apache\bin") set "apache=%%~fi" echo !apache! cd !apache! //this not change directory echo %~dp0 httpd -k start -c "documentroot !folder!" pause
Comments
Post a Comment