E
E
Evgeny Ivanov2018-11-01 13:51:01
cmd/bat
Evgeny Ivanov, 2018-11-01 13:51:01

Where is the error in the bat file?

I need to run caddy server under windows. But the point here is not in the server, but in the bat files.
I make video instructions https://www.youtube.com/watch?v=CrN3jOqQbXo
The launch occurs "from bat files." Launched 1.bat 2.bat and everything should work.
But at a certain place, the author of the video does not start anything (17th minute), the author starts to look at something (paths?), Run and then everything works.
(Of course, it doesn’t explain anything - they did/wrote batch files - it doesn’t work, well, okay.)
Most likely, the author of the video made a mistake somewhere.
My paths are C:\caddy and C:\php.
Here are my bat files.
1.bat

@ECHO off
ECHO Start caddy
start caddy
pause

2.bat
@ECHO off
ECHO Start FastCGI
set path=c:/php;c:/caddy;%PATH%
c:\php\php-cgi.exe -b 127.0.0.1:9123 -c c:\php\php.ini
pause

Most likely they are wrong. In logic, in syntax, something is called wrong.
Where is the error in the bat file?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexander, 2018-11-01
@alexr64

@ECHO off
ECHO Start FastCGI
set path=c:/php;c:/caddy;%PATH%
start caddy
c:\php\php-cgi.exe -b 127.0.0.1:9123 -c c:\php\php.ini
pause

The error is that in the first batch file there is still no path in PATH to caddy. Well, in general, do you need it in the form of 2 batch files?

R
res2001, 2018-11-01
@res2001

start c:\caddy\caddy

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question