user1376023
user1376023

Reputation: 1

How to start a python program in a .BAT file without ending the .BAT script

I need to run a python program and then move a file into a directory created by said program, only problem is once I run the python program it immediately ends the .BAT script.
this is the BAT file:

@ECHO off  
scrapy startproject work   
move script.py work\work\spiders  
cd work  
scrapy crawl script  
pause

Upvotes: 0

Views: 210

Answers (2)

foxidrive
foxidrive

Reputation: 41224

scrapy would seem to be a batch file so use call before it.

call scrapy param1

Upvotes: 1

Stefan Falk
Stefan Falk

Reputation: 25367

You can try this:

@echo off
start /W notepad
echo 1. Back from notepad  
start /W wordpad
echo 2. Back from wordpad
start /W notepad
echo 3. Back from notepad. Script done

Got it from here.

Upvotes: 0

Related Questions