I hope you can help me out with this issue, which I thought would be quite trivial but is turning out to be quite a bugger. As mentioned in the subject line this is what I want to accomplish:
- Automatically run 5 command prompts, each new command prompt needs to do the following
- Change directories to a specific location
- start the built in php web server
This is the code I currently have for my .bat file:
start cmd /k
cd "directory 1"
php -S localhost:8081
start cmd /k
cd "directory 02"
php -S localhost:8082
start cmd /k
cd "directory 03"
php -S localhost:8083
etc...
Update (here are the working commands after some tweaking)
start "Dir1" /d "directory1" cmd /k "php -S localhost:8081"
start "Dir2" /d "directory2" cmd /k "php -S localhost:8082"
start "Dir3" /d "directory3" cmd /k "php -S localhost:8083"
start "Dir4" /d "directory4" cmd /k "php -S localhost:8084"
start "Dir5" /d "directory5" cmd /k "php -S localhost:8085"
start "Dir6" /d "directory6" cmd /k "php -S localhost:8086"
Thanks very much. Cheers, Tim K