I'm trying to get a batch-file to execute the following code:
cmd /K C:\ProgramData\Anaconda3\Scripts\activate.bat C:\ProgramData\Anaconda3
cd C:\ProgramData\Anaconda3\Lib\site-packages\tabpy_server\
run startup.bat
The first line execute properly and opens an anaconda python command-prompt window. The next lines fail to execute.
What am I missing?
The idea is to create a batch file which can be added to windows task-scheduler to start the tabpy server service.
There is no run
command in batch. What you want is the start
command. Also you want to use call
instead of cmd /k
because it is used for starting another instance of cmd while you just want to call the batch file. Here is an example:
call C:\ProgramData\Anaconda3\Scripts\activate.bat C:\ProgramData\Anaconda3
cd C:\ProgramData\Anaconda3\Lib\site-packages\tabpy_server\
start startup.bat
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.