E
E
Evgeny Musonov2020-06-30 11:49:35
cmd/bat
Evgeny Musonov, 2020-06-30 11:49:35

How to force close the console window after start /wait?

I want to build the build and then copy the file, only after the start command the window does not close, how can I solve it?

start /wait npm run build
echo builded
copy D:\OSPanel\domains\geoplaces\forapp\.htaccess D:\OSPanel\domains\geoplaces\app
echo htaccess is copied

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
Evgeny Musonov, 2020-06-30
@evmusonov

Solved the problem this way

set project=D:\OSPanel\domains\geoplaces\
echo @echo off>> %project%npm.bat
echo npm run build>> %project%npm.bat
call %project%npm.bat
echo builded
copy %project%forapp\.htaccess %project%app
echo htaccess is copied
del %project%npm.bat

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question