I'm so lazy - [ghost one click start button script]

Is there some way - like bat file or smth that would automatically
cd to my ghost folder, then just run ghost start and open http://localhost:2368
all that just by me clicking on it?

I hate command prompt -.-

Well, You said you are lazy that’s why I have spent some time and manadged to make something working for you.

Add the following code in .bat file and save that file. double click that file.

I assume you have your ghost folder in C: driver. In case not. Change the second line C:\ghost with your ghost folder path.

@ECHO off
CD /D C:\ghost
CMD /C "ghost start"
start /wait http://localhost:2368/

ECHO.
ECHO Do you want to restart or stop Ghost?

:choice
ECHO.
set /P c=[ enter R=restart / S=Stop ]?
if /I "%c%" EQU "R" goto :restart
if /I "%c%" EQU "S" goto :stop
goto :choice

:restart
CMD /C "ghost restart"
goto :choice

:stop
CMD /C "ghost stop" 
exit

GIST: Ghost start , restart, stop batch script for lazy persons. I assume you have your ghost folder in C: driver. In case not. Change the second line C:\ghost with your ghost folder path. · GitHub

1 Like

excellent! Thanks a lot. :smile:
may long live one click solutions :smile:

This should come with every installation. LOL

That’s bit crazy :smiley: anyway I am glad that it helped you.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.