How do I convert this set of command prompt lines to a BAT file so it can quickly be rerun by others
cd "C:\Program Files\Alteryx\bin\Miniconda3\Scripts"
activate DesignerBaseTools_vEnv
cd "C:\Program Files\Alteryx\bin\Miniconda3\envs\DesignerBaseTools_vEnv\Scripts"
pip install py-geohex3
It doesn't change the directory so then can't find activate
U:\11 Personal Folders\xxx>cd "C:\Program Files\Alteryx\bin\Miniconda3\Scripts"
U:\11 Personal Folders\xxx>activate DesignerBaseTools_vEnv
'activate' is not recognized as an internal or external command,
operable program or batch file.
U:\11 Personal Folders\xxx>cd "C:\Program Files\Alteryx\bin\Miniconda3\envs\DesignerBaseTools_vEnv\Scripts"
U:\11 Personal Folders\xxx>pip install py-geohex3
'pip' is not recognized as an internal or external command,
operable program or batch file.
U:\11 Personal Folders\xxx>PAUSE
Press any key to continue . . .
CodePudding user response:
pushd "C:\Program Files\Alteryx\bin\Miniconda3\Scripts"
CALL activate DesignerBaseTools_vEnv
popd
pushd "C:\Program Files\Alteryx\bin\Miniconda3\envs\DesignerBaseTools_vEnv\Scripts"
pip install py-geohex3
popd
should work. pushd
pushes the current directory to a stack and switches to the target directory.
popd
returns to the original directory.
Fixed in view of @mofi's comment. I'm also in the dark about pip
- I've not used it since the CP/M days.