I want to write a batch file that will do following things in given order:
cd c:\Program files\IIS Express
iisexpress /path:"C:\FormsAdmin.Site" /port:8088 /clr:v2.0
http://localhost:8088/default.aspx
Note: The cmd window should not be closed after executing the commands.
I tried start cmd.exe /k "cd\ & cd ProgramFiles\IIS Express", but it is not solving my purpose.
A batch file (also known as a . bat file or batch script) is a text file that the Windows cmd.exe command line processor executes as a batch job.
Try using the conditional execution & or the && between each command either with a copy and paste into the cmd.exe window or in a batch file. Additionally, you can use the double pipe || symbols instead to only run the next command if the previous command failed.
So, make an actual batch file: open up notepad, type the commands you want to run, and save as a .bat
file. Then double click the .bat file to run it.
Try something like this for a start:
c:\ cd c:\Program files\IIS Express start iisexpress /path:"C:\FormsAdmin.Site" /port:8088 /clr:v2.0 start http://localhost:8088/default.aspx pause
I think the correct syntax is:
cmd /k "cd c:\<folder name>"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With